Skip to content

Commit 3515acc

Browse files
committed
Fix type mismatch - g_watchdogBreadcrumb is uint32_t not uint8_t
- Removed duplicate extern declarations in comms_controller.cpp - Changed uint8_t to uint32_t in EthernetManager.cpp - Fixed savedBreadcrumb type to uint32_t - g_watchdogBreadcrumb is already declared in comms_controller.h
1 parent 62b8b60 commit 3515acc

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/libClearCore/src/EthernetManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ void EthernetManager::Setup() {
457457

458458
void EthernetManager::Refresh() {
459459
#if WATCHDOG_ENABLED
460-
extern volatile uint8_t g_watchdogBreadcrumb;
460+
extern volatile uint32_t g_watchdogBreadcrumb;
461461
g_watchdogBreadcrumb = 0x0C; // WD_BREADCRUMB_NETWORK_REFRESH
462462
#endif
463463

src/comms_controller.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ void CommsController::update() {
5353

5454
bool CommsController::enqueueRx(const char* msg, const IpAddress& ip, uint16_t port) {
5555
#if WATCHDOG_ENABLED
56-
extern volatile uint8_t g_watchdogBreadcrumb;
5756
g_watchdogBreadcrumb = WD_BREADCRUMB_RX_ENQUEUE;
5857
#endif
5958

@@ -391,8 +390,7 @@ void CommsController::processTxQueue() {
391390

392391
void CommsController::reportEvent(const char* statusType, const char* message) {
393392
#if WATCHDOG_ENABLED
394-
extern volatile uint8_t g_watchdogBreadcrumb;
395-
uint8_t savedBreadcrumb = g_watchdogBreadcrumb;
393+
uint32_t savedBreadcrumb = g_watchdogBreadcrumb;
396394
g_watchdogBreadcrumb = 0x10; // reportEvent start
397395
#endif
398396

0 commit comments

Comments
 (0)