Fix HEART_WDT_CHECK in case there is not external module

Resolves #143
This commit is contained in:
Raphael Coeffic
2021-06-01 18:53:51 +02:00
parent 746e011b54
commit 4256fd76d4
+8 -3
View File
@@ -401,11 +401,16 @@ inline bool SPLASH_NEEDED()
constexpr uint8_t HEART_TIMER_10MS = 0x01;
constexpr uint8_t HEART_TIMER_PULSES = 0x02; // when multiple modules this is the first one
constexpr uint8_t HEART_WDT_CHECK = HEART_TIMER_10MS
#if defined(HARDWARE_INTERNAL_MODULE)
constexpr uint8_t HEART_WDT_CHECK = HEART_TIMER_10MS + (HEART_TIMER_PULSES << INTERNAL_MODULE) + (HEART_TIMER_PULSES << EXTERNAL_MODULE);
#else
constexpr uint8_t HEART_WDT_CHECK = HEART_TIMER_10MS + (HEART_TIMER_PULSES << EXTERNAL_MODULE);
+ (HEART_TIMER_PULSES << INTERNAL_MODULE)
#endif
#if defined(HARDWARE_EXTERNAL_MODULE)
+ (HEART_TIMER_PULSES << EXTERNAL_MODULE)
#endif
; // end of HEART_WDT_CHECK
extern uint8_t heartbeat;
#if !defined(BOOT)