From 4256fd76d44a73f6024c8986223ca9774d7e85e2 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Tue, 1 Jun 2021 18:51:21 +0200 Subject: [PATCH] Fix HEART_WDT_CHECK in case there is not external module Resolves #143 --- radio/src/opentx.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 44880f5bb..bd913b40d 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -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)