Skip to content

Commit b3f11ce

Browse files
committed
updated periodic print defines
1 parent 570a91a commit b3f11ce

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

fw/v24/inc/config.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ extern "C" {
3232
//#define TRACE_VCP
3333

3434
// Enable periodic status print
35-
//#define PERIODIC_STATUS
35+
#define PERIODIC_STATUS
36+
// Interval in ms for the periodic status print
37+
#define PERIODIC_STATUS_INT 30000
3638

3739
// Report buffer space in 16-byte blocks instead of LDUs
3840
#define STATUS_SPACE_BLOCKS

fw/v24/inc/hdlc.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ extern "C" {
4444
/* Interval between sending RRs in idle mode */
4545
#define RR_INTERVAL 5000
4646

47-
/* Periodic Status Report Interval */
48-
#define STATUS_INTERVAL 30000
49-
5047
#define FRAME_SPACING 2
5148

5249
/* Macros for getting high/low bits of 16 bit numbers */

fw/v24/src/hdlc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ void HdlcCallback()
8888
}
8989

9090
// Periodic status print
91-
if (HAL_GetTick() - lastStatus > STATUS_INTERVAL)
91+
#ifdef PERIODIC_STATUS
92+
if (HAL_GetTick() - lastStatus > PERIODIC_STATUS_INT)
9293
{
9394
lastStatus = HAL_GetTick();
94-
#ifdef PERIODIC_STATUS
9595
uint32_t errFrames = rxTotalFrames - rxValidFrames;
9696
if (HDLCPeerConnected)
9797
{
@@ -108,8 +108,8 @@ void HdlcCallback()
108108
log_warn("HDLC frame sync lost");
109109
VCPWriteDebug1("HDLC frame sync lost");
110110
}
111-
#endif
112111
}
112+
#endif
113113
}
114114

115115
void hdlcFrameSpace()

0 commit comments

Comments
 (0)