From 4560d8de42fe19992b04b62fce166d4898994bc4 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Tue, 25 Jun 2019 11:30:52 +0200 Subject: [PATCH] Compilation fix --- radio/src/definitions.h | 3 +++ radio/src/opentx.h | 3 --- radio/src/pulses/modules_helpers.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/radio/src/definitions.h b/radio/src/definitions.h index 8b5f5391e..8399656a6 100644 --- a/radio/src/definitions.h +++ b/radio/src/definitions.h @@ -67,4 +67,7 @@ #define CONVERT_UINT_PTR(x) ((uint32_t *)(x)) #endif +// returns the number of elements of an array +#define DIM(arr) (sizeof((arr)) / sizeof((arr)[0])) + #endif // _DEFINITIONS_H_ diff --git a/radio/src/opentx.h b/radio/src/opentx.h index e36d5f6a0..99243c1d8 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -634,9 +634,6 @@ void doLoopCommonActions(); #define BITMASK(bit) (1<<(bit)) -/// returns the number of elements of an array -#define DIM(arr) (sizeof((arr))/sizeof((arr)[0])) - template inline t min(t a, t b) { return a inline t max(t a, t b) { return a>b?a:b; } template inline t sgn(t a) { return a>0 ? 1 : (a < 0 ? -1 : 0); } diff --git a/radio/src/pulses/modules_helpers.h b/radio/src/pulses/modules_helpers.h index efda11518..b6c346203 100644 --- a/radio/src/pulses/modules_helpers.h +++ b/radio/src/pulses/modules_helpers.h @@ -22,6 +22,7 @@ #define _MODULES_H_ #include "bitfield.h" +#include "definitions.h" #define CROSSFIRE_CHANNELS_COUNT 16