diff --git a/radio/src/opentx.h b/radio/src/opentx.h index bafc0517d..a5216a0a5 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -396,12 +396,12 @@ extern uint8_t channel_order(uint8_t x); #define ROTENC_DELAY_HIGHSPEED 16 #endif -#define HEART_TIMER_10MS 1 -#define HEART_TIMER_PULSES 2 // when multiple modules this is the first one +constexpr uint8_t HEART_TIMER_10MS = 0x01; +constexpr uint8_t HEART_TIMER_PULSES = 0x02; // when multiple modules this is the first one #if defined(PCBTARANIS) || defined(PCBHORUS) -#define HEART_WDT_CHECK (HEART_TIMER_10MS + (HEART_TIMER_PULSES << 0) + (HEART_TIMER_PULSES << 1)) +constexpr uint8_t HEART_WDT_CHECK = (HEART_TIMER_10MS + (HEART_TIMER_PULSES << 0) + (HEART_TIMER_PULSES << 1)); #else -#define HEART_WDT_CHECK (HEART_TIMER_10MS + HEART_TIMER_PULSES) +constexpr uint8_t HEART_WDT_CHECK = (HEART_TIMER_10MS + HEART_TIMER_PULSES); #endif extern uint8_t heartbeat;