Position hold depends on GPS (#14101)
[betaflight.git] / src / test / unit / rx_spi_expresslrs_unittest.cc
blobd1cf06679e47df9c20fe8ed1e84e9d3f996aa702
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
19 * Based on https://github.com/ExpressLRS/ExpressLRS
20 * Thanks to AlessandroAU, original creator of the ExpressLRS project.
23 #include <stdint.h>
24 #include <stdbool.h>
26 #include <limits.h>
28 extern "C" {
29 #include "platform.h"
31 #include "build/atomic.h"
33 #include "drivers/io.h"
34 #include "common/filter.h"
36 #include "pg/pg.h"
37 #include "pg/pg_ids.h"
38 #include "pg/rx_spi.h"
39 #include "pg/rx_spi_expresslrs.h"
41 #include "rx/rx_spi.h"
42 #include "rx/expresslrs.h"
43 #include "rx/expresslrs_impl.h"
45 #include "drivers/rx/rx_sx127x.h"
46 #include "drivers/rx/rx_sx1280.h"
48 extern uint8_t fhssSequence[ELRS_NR_SEQUENCE_ENTRIES];
49 extern uint16_t crc14tab[ELRS_CRC_LEN];
51 extern elrsReceiver_t receiver;
52 static const elrsReceiver_t empty = elrsReceiver_t();
54 static rxRuntimeState_t config = rxRuntimeState_t();
55 static rxSpiExtiConfig_t extiConfig;
56 static const rxSpiConfig_t injectedConfig = {
57 .extiIoTag = IO_TAG(PA0),
61 #include "unittest_macros.h"
62 #include "gtest/gtest.h"
64 // set to dump generted sequences during test
65 const bool PRINT_FHSS_SEQUENCES = false;
67 //make clean test_rx_spi_expresslrs_unittest
68 TEST(RxSpiExpressLrsUnitTest, TestCrc14)
70 uint16_t expectedCrc14Tab[ELRS_CRC_LEN] = {
71 0,28247,62201,40110,52133,42482,14684,22283,
72 38730,63773,26035,3044,23791,12984,44566,49217,
73 11924,16579,56429,45626,58673,35686,6088,31135,
74 47582,55177,19239,9584,29307,7212,32898,61141,
75 29567,7464,33158,61393,47322,54925,18979,9332,
76 58421,35426,5836,30875,12176,16839,56681,45886,
77 24043,13244,44818,49477,38478,63513,25783,2784,
78 51873,42230,14424,22031,260,28499,62461,40362,
79 51369,42750,14928,21511,780,27995,61941,40866,
80 24547,12724,44314,49997,37958,64017,26303,2280,
81 58941,34922,5316,31379,11672,17359,57185,45366,
82 29047,7968,33678,60889,47826,54405,18475,9852,
83 48086,54657,18735,10104,28787,7716,33418,60637,
84 11420,17099,56933,45106,59193,35182,5568,31639,
85 38210,64277,26555,2540,24295,12464,44062,49737,
86 520,27743,61681,40614,51629,43002,15188,21763,
87 37202,65285,25515,3580,23287,13472,43022,50777,
88 1560,26703,62689,39606,52669,41962,16196,20755,
89 49094,53649,19775,9064,29795,6708,34458,59597,
90 10380,18139,55925,46114,58153,36222,4560,32647,
91 57901,35962,4308,32387,10632,18399,56177,46374,
92 30055,6960,34718,59849,48834,53397,19515,8812,
93 52409,41710,15936,20503,1820,26955,62949,39858,
94 23539,13732,43274,51037,36950,65025,25263,3320,
95 23035,14252,43778,50517,37470,64521,24743,3824,
96 52913,41190,15432,21023,1300,27459,63469,39354,
97 30575,6456,34198,60353,48330,53917,20019,8292,
98 57381,36466,4828,31883,11136,17879,55673,46894,
99 10884,17619,55421,46634,57633,36726,5080,32143,
100 48590,54169,20279,8544,30315,6204,33938,60101,
101 1040,27207,63209,39102,53173,41442,15692,21275,
102 37722,64781,24995,4084,22783,13992,43526,50257
105 generateCrc14Table();
106 for (int i = 0; i < ELRS_CRC_LEN; i++) {
107 EXPECT_EQ(expectedCrc14Tab[i], crc14tab[i]);
111 static void printFhssSequence(uint8_t *seq)
113 for (int i = 0; i < ELRS_NR_SEQUENCE_ENTRIES; i++) {
114 printf("%d, ", seq[i]);
115 if (i % 10 == 9) {
116 printf("\n");
119 printf("\n\n");
122 TEST(RxSpiExpressLrsUnitTest, TestFHSSTable)
124 const uint8_t UID[6] = {1, 2, 3, 4, 5, 6};
125 const uint32_t seed = elrsUidToSeed(UID);
127 const uint8_t expectedSequence[2][ELRS_NR_SEQUENCE_ENTRIES] = {
129 41, 39, 72, 45, 76, 48, 3, 79, 55, 66,
130 68, 13, 65, 20, 15, 43, 21, 54, 46, 37,
131 60, 29, 50, 40, 34, 61, 69, 64, 10, 70,
132 16, 2, 0, 38, 36, 30, 47, 8, 59, 35,
133 4, 71, 73, 11, 9, 51, 32, 1, 18, 12,
134 22, 26, 49, 25, 6, 7, 77, 62, 42, 57,
135 53, 74, 14, 31, 28, 75, 78, 23, 24, 27,
136 17, 44, 67, 33, 19, 5, 52, 56, 58, 63,
137 41, 24, 21, 5, 58, 3, 70, 76, 59, 67,
138 15, 78, 26, 10, 2, 27, 7, 23, 48, 31,
139 72, 13, 56, 45, 51, 50, 44, 54, 39, 53,
140 22, 71, 9, 47, 55, 36, 49, 43, 4, 40,
141 52, 25, 60, 28, 34, 74, 6, 29, 62, 14,
142 8, 0, 19, 17, 79, 46, 42, 77, 37, 18,
143 66, 38, 30, 75, 32, 63, 1, 33, 69, 12,
144 61, 57, 35, 65, 11, 64, 20, 73, 68, 16,
145 41, 75, 76, 17, 26, 22, 25, 60, 53, 43,
146 72, 50, 38, 24, 79, 77, 49, 33, 15, 8,
147 14, 59, 42, 64, 1, 30, 29, 35, 39, 56,
148 40, 36, 74, 18, 47, 73, 62, 13, 61, 58,
149 44, 71, 0, 37, 19, 16, 48, 63, 65, 20,
150 69, 54, 52, 70, 31, 3, 12, 21, 57, 10,
151 5, 7, 28, 55, 27, 6, 11, 9, 78, 45,
152 68, 66, 2, 67, 51, 32, 34, 23, 4, 46
155 21, 7, 12, 6, 11, 27, 35, 9, 18, 28,
156 13, 1, 24, 32, 30, 38, 14, 5, 2, 23,
157 37, 26, 17, 3, 25, 29, 39, 36, 0, 4,
158 33, 10, 16, 31, 34, 22, 8, 19, 15, 20,
159 21, 33, 11, 13, 26, 6, 1, 7, 2, 0,
160 9, 28, 19, 18, 23, 10, 29, 14, 25, 3,
161 30, 15, 35, 38, 5, 39, 22, 8, 20, 24,
162 34, 27, 37, 36, 31, 12, 4, 16, 32, 17,
163 21, 20, 30, 37, 11, 5, 26, 3, 18, 32,
164 35, 13, 38, 9, 15, 2, 16, 34, 22, 29,
165 7, 24, 10, 39, 28, 8, 31, 1, 23, 0,
166 12, 36, 19, 4, 27, 17, 6, 25, 33, 14,
167 21, 8, 32, 16, 15, 20, 30, 29, 5, 7,
168 31, 33, 28, 9, 36, 34, 13, 1, 0, 12,
169 35, 26, 25, 39, 22, 19, 11, 2, 37, 23,
170 10, 14, 6, 3, 17, 27, 18, 38, 4, 24,
171 21, 12, 25, 32, 9, 8, 6, 28, 38, 17,
172 2, 31, 10, 16, 20, 24, 13, 22, 39, 29,
173 26, 5, 7, 18, 19, 11, 14, 30, 35, 4,
174 37, 15, 0, 34, 33, 23, 27, 1, 36, 3,
175 21, 36, 5, 31, 17, 32, 10, 34, 1, 3,
176 7, 2, 28, 38, 13, 4, 22, 29, 0, 23,
177 20, 26, 25, 16, 30, 11, 35, 6, 19, 24,
178 8, 18, 33, 15, 37, 12, 14, 39, 27, 9
182 fhssGenSequence(seed, ISM2400);
183 if (PRINT_FHSS_SEQUENCES) {
184 printFhssSequence(fhssSequence);
186 for (int i = 0; i < ELRS_NR_SEQUENCE_ENTRIES; i++) {
187 EXPECT_EQ(expectedSequence[0][i], fhssSequence[i]);
190 fhssGenSequence(seed, FCC915);
191 if (PRINT_FHSS_SEQUENCES) {
192 printFhssSequence(fhssSequence);
194 for (int i = 0; i < ELRS_NR_SEQUENCE_ENTRIES; i++) {
195 EXPECT_EQ(expectedSequence[1][i], fhssSequence[i]);
199 TEST(RxSpiExpressLrsUnitTest, TestInitUnbound)
201 const uint8_t bindUID[6] = {0, 1, 2, 3, 4, 5};
203 receiver = empty;
204 expressLrsSpiInit(&injectedConfig, &config, &extiConfig);
206 //check initialization of elrsReceiver_t
207 EXPECT_TRUE(receiver.inBindingMode);
208 EXPECT_EQ(IO_NONE, receiver.resetPin);
209 EXPECT_EQ(IO_NONE, receiver.busyPin);
210 for (int i = 0; i < 6; i++) {
211 EXPECT_EQ(bindUID[i], receiver.UID[i]);
213 EXPECT_EQ(0, receiver.nonceRX);
214 EXPECT_EQ(0, receiver.freqOffset);
215 EXPECT_EQ(0, receiver.lastValidPacketMs);
217 const uint32_t initialFrequencies[7] = {
218 FREQ_HZ_TO_REG_VAL_900(434420000),
219 FREQ_HZ_TO_REG_VAL_900(922100000),
220 FREQ_HZ_TO_REG_VAL_900(434450000),
221 FREQ_HZ_TO_REG_VAL_900(867783300),
222 FREQ_HZ_TO_REG_VAL_900(866949900),
223 FREQ_HZ_TO_REG_VAL_900(916100000),
224 FREQ_HZ_TO_REG_VAL_24(2441400000)
227 for (int i = 0; i < 7; i++) {
228 receiver = empty;
229 rxExpressLrsSpiConfigMutable()->domain = i;
230 expressLrsSpiInit(&injectedConfig, &config, &extiConfig);
231 EXPECT_EQ(initialFrequencies[i], receiver.currentFreq);
234 // for unbound we need to initialize in 50HZ mode
235 receiver = empty;
236 rxExpressLrsSpiConfigMutable()->rateIndex = 1;
237 rxExpressLrsSpiConfigMutable()->domain = FCC915;
238 expressLrsSpiInit(&injectedConfig, &config, &extiConfig);
239 EXPECT_EQ(airRateConfig[0][2].index, receiver.modParams->index);
240 EXPECT_EQ(airRateConfig[0][2].enumRate, receiver.modParams->enumRate);
241 EXPECT_EQ(airRateConfig[0][2].bw, receiver.modParams->bw);
242 EXPECT_EQ(airRateConfig[0][2].sf, receiver.modParams->sf);
243 EXPECT_EQ(airRateConfig[0][2].cr, receiver.modParams->cr);
244 EXPECT_EQ(airRateConfig[0][2].interval, receiver.modParams->interval);
245 EXPECT_EQ(airRateConfig[0][2].tlmInterval, receiver.modParams->tlmInterval);
246 EXPECT_EQ(airRateConfig[0][2].fhssHopInterval, receiver.modParams->fhssHopInterval);
247 EXPECT_EQ(airRateConfig[0][2].preambleLen, receiver.modParams->preambleLen);
249 receiver = empty;
250 rxExpressLrsSpiConfigMutable()->rateIndex = 1;
251 rxExpressLrsSpiConfigMutable()->domain = ISM2400;
252 expressLrsSpiInit(&injectedConfig, &config, &extiConfig);
253 EXPECT_EQ(airRateConfig[1][5].index, receiver.modParams->index);
254 EXPECT_EQ(airRateConfig[1][5].enumRate, receiver.modParams->enumRate);
255 EXPECT_EQ(airRateConfig[1][5].bw, receiver.modParams->bw);
256 EXPECT_EQ(airRateConfig[1][5].sf, receiver.modParams->sf);
257 EXPECT_EQ(airRateConfig[1][5].cr, receiver.modParams->cr);
258 EXPECT_EQ(airRateConfig[1][5].interval, receiver.modParams->interval);
259 EXPECT_EQ(airRateConfig[1][5].tlmInterval, receiver.modParams->tlmInterval);
260 EXPECT_EQ(airRateConfig[1][5].fhssHopInterval, receiver.modParams->fhssHopInterval);
261 EXPECT_EQ(airRateConfig[1][5].preambleLen, receiver.modParams->preambleLen);
263 //check switch mode
264 receiver = empty;
265 expressLrsSpiInit(&injectedConfig, &config, &extiConfig);
266 EXPECT_EQ(16, config.channelCount);
269 TEST(RxSpiExpressLrsUnitTest, TestInitBound)
271 const uint8_t validUID[6] = {0, 0, 1, 2, 3, 4};
272 receiver = empty;
273 memcpy(rxExpressLrsSpiConfigMutable()->UID, validUID, 6);
275 // check mod params
276 for (int i = 0; i < ELRS_RATE_MAX_900; i++) {
277 receiver = empty;
278 rxExpressLrsSpiConfigMutable()->rateIndex = i;
279 rxExpressLrsSpiConfigMutable()->domain = FCC915;
280 expressLrsSpiInit(&injectedConfig, &config, &extiConfig);
281 EXPECT_EQ(airRateConfig[0][i].index, receiver.modParams->index);
282 EXPECT_EQ(airRateConfig[0][i].enumRate, receiver.modParams->enumRate);
283 EXPECT_EQ(airRateConfig[0][i].bw, receiver.modParams->bw);
284 EXPECT_EQ(airRateConfig[0][i].sf, receiver.modParams->sf);
285 EXPECT_EQ(airRateConfig[0][i].cr, receiver.modParams->cr);
286 EXPECT_EQ(airRateConfig[0][i].interval, receiver.modParams->interval);
287 EXPECT_EQ(airRateConfig[0][i].tlmInterval, receiver.modParams->tlmInterval);
288 EXPECT_EQ(airRateConfig[0][i].fhssHopInterval, receiver.modParams->fhssHopInterval);
289 EXPECT_EQ(airRateConfig[0][i].preambleLen, receiver.modParams->preambleLen);
292 for (int i = 0; i < ELRS_RATE_MAX_24; i++) {
293 receiver = empty;
294 rxExpressLrsSpiConfigMutable()->rateIndex = i;
295 rxExpressLrsSpiConfigMutable()->domain = ISM2400;
296 expressLrsSpiInit(&injectedConfig, &config, &extiConfig);
297 EXPECT_EQ(airRateConfig[1][i].index, receiver.modParams->index);
298 EXPECT_EQ(airRateConfig[1][i].enumRate, receiver.modParams->enumRate);
299 EXPECT_EQ(airRateConfig[1][i].bw, receiver.modParams->bw);
300 EXPECT_EQ(airRateConfig[1][i].sf, receiver.modParams->sf);
301 EXPECT_EQ(airRateConfig[1][i].cr, receiver.modParams->cr);
302 EXPECT_EQ(airRateConfig[1][i].interval, receiver.modParams->interval);
303 EXPECT_EQ(airRateConfig[1][i].tlmInterval, receiver.modParams->tlmInterval);
304 EXPECT_EQ(airRateConfig[1][i].fhssHopInterval, receiver.modParams->fhssHopInterval);
305 EXPECT_EQ(airRateConfig[1][i].preambleLen, receiver.modParams->preambleLen);
308 expressLrsSpiInit(&injectedConfig, &config, &extiConfig);
309 EXPECT_FALSE(receiver.inBindingMode);
310 for (int i = 0; i < 6; i++) {
311 EXPECT_EQ(validUID[i], receiver.UID[i]);
315 TEST(RxSpiExpressLrsUnitTest, TestLQCalc)
317 lqReset();
318 for (int i = 1; i <= 100; i++) {
319 lqNewPeriod();
320 lqIncrease();
321 EXPECT_EQ(i, lqGet());
323 lqNewPeriod();
324 lqIncrease();
325 EXPECT_EQ(100, lqGet());
326 for (int i = 99; i >= 0; i--) {
327 lqNewPeriod();
328 EXPECT_EQ(i, lqGet());
330 lqNewPeriod();
331 EXPECT_EQ(0, lqGet());
332 lqReset();
333 lqNewPeriod();
334 EXPECT_EQ(0, lqGet());
335 lqIncrease();
336 EXPECT_EQ(1, lqGet());
339 TEST(RxSpiExpressLrsUnitTest, Test1bSwitchDecode)
341 EXPECT_EQ(1000, convertSwitch1b(0));
342 EXPECT_EQ(2000, convertSwitch1b(1));
343 EXPECT_EQ(2000, convertSwitch1b(2));
344 EXPECT_EQ(2000, convertSwitch1b(255));
347 TEST(RxSpiExpressLrsUnitTest, Test3bSwitchDecode)
349 EXPECT_EQ(1000, convertSwitch3b(0));
350 EXPECT_EQ(1275, convertSwitch3b(1));
351 EXPECT_EQ(1425, convertSwitch3b(2));
352 EXPECT_EQ(1575, convertSwitch3b(3));
353 EXPECT_EQ(1725, convertSwitch3b(4));
354 EXPECT_EQ(2000, convertSwitch3b(5));
355 EXPECT_EQ(1500, convertSwitch3b(6));
356 EXPECT_EQ(1500, convertSwitch3b(7));
357 EXPECT_EQ(1500, convertSwitch3b(8));
358 EXPECT_EQ(1500, convertSwitch3b(123));
359 EXPECT_EQ(1500, convertSwitch3b(255));
362 TEST(RxSpiExpressLrsUnitTest, Test4bSwitchDecode)
364 EXPECT_EQ(1000, convertSwitchNb(0, 15));
365 EXPECT_EQ(1066, convertSwitchNb(1, 15));
366 EXPECT_EQ(1133, convertSwitchNb(2, 15));
367 EXPECT_EQ(1200, convertSwitchNb(3, 15));
368 EXPECT_EQ(1266, convertSwitchNb(4, 15));
369 EXPECT_EQ(1333, convertSwitchNb(5, 15));
370 EXPECT_EQ(1400, convertSwitchNb(6, 15));
371 EXPECT_EQ(1466, convertSwitchNb(7, 15));
372 EXPECT_EQ(1533, convertSwitchNb(8, 15));
373 EXPECT_EQ(1600, convertSwitchNb(9, 15));
374 EXPECT_EQ(1666, convertSwitchNb(10, 15));
375 EXPECT_EQ(1733, convertSwitchNb(11, 15));
376 EXPECT_EQ(1800, convertSwitchNb(12, 15));
377 EXPECT_EQ(1866, convertSwitchNb(13, 15));
378 EXPECT_EQ(1933, convertSwitchNb(14, 15));
379 EXPECT_EQ(2000, convertSwitchNb(15, 15));
380 EXPECT_EQ(1500, convertSwitchNb(16, 15));
381 EXPECT_EQ(1500, convertSwitchNb(255, 15));
384 // STUBS
386 extern "C" {
388 uint8_t systemState;
389 int16_t *debug;
390 uint8_t debugMode;
392 rssiSource_e rssiSource;
393 linkQualitySource_e linkQualitySource;
394 void setRssi(uint16_t , rssiSource_e ) {}
395 void setRssiDirect(uint16_t , rssiSource_e ) {}
397 uint32_t micros(void) { return 0; }
398 uint32_t millis(void) { return 0; }
400 bool IORead(IO_t ) { return true; }
401 IO_t IOGetByTag(ioTag_t ) { return (IO_t)1; }
402 void IOHi(IO_t ) {}
403 void IOLo(IO_t ) {}
405 void saveConfigAndNotify(void) {}
407 void rxSpiCommonIOInit(const rxSpiConfig_t *) {}
408 void rxSpiLedBlinkRxLoss(rx_spi_received_e ) {}
409 void rxSpiLedBlinkBind(void) {}
410 bool rxSpiCheckBindRequested(bool)
412 return false;
414 bool rxSpiExtiConfigured(void) { return true; }
416 bool sx1280IsBusy(void) { return false; }
417 void sx1280Config(const uint8_t /* bw */, const uint8_t /* sfbt */, const uint8_t /* cr */,
418 const uint32_t /* freq */, const uint8_t /* preambleLength */, const bool /* iqInverted */,
419 const uint32_t /* flrcSyncWord */, const uint16_t /* flrcCrcSeed */, const bool /* isFlrc */) {}
420 void sx1280StartReceiving(void) {}
421 void sx1280ISR(void) {}
422 bool rxSpiGetExtiState(void) { return false; }
423 void sx1280HandleFromTock(void) {}
424 bool sx1280HandleFromTick(void) { return false; }
425 void sx1280TransmitData(const uint8_t *, const uint8_t ) {}
426 void sx1280ReceiveData(uint8_t *, const uint8_t ) {}
427 void sx1280SetFrequencyReg(const uint32_t ) {}
428 void sx1280GetLastPacketStats(int8_t *rssi, int8_t *snr)
430 *rssi = 0;
431 *snr = 0;
433 void sx1280AdjustFrequency(int32_t *, const uint32_t ) {}
434 bool sx1280Init(IO_t , IO_t ) { return true; }
435 void sx1280SetOutputPower(const int8_t ) {}
437 void sx127xConfig(const uint8_t /* bw */, const uint8_t /* sfbt */, const uint8_t /* cr */,
438 const uint32_t /* freq */, const uint8_t /* preambleLength */, const bool /* iqInverted */,
439 const uint32_t /* flrcSyncWord */, const uint16_t /* flrcCrcSeed */, const bool /* isFlrc */) {}
440 void sx127xStartReceiving(void) {}
441 uint8_t sx127xISR(uint32_t *timestamp)
443 *timestamp = 0;
444 return 0;
446 void sx127xTransmitData(const uint8_t *, const uint8_t ) {}
447 void sx127xReceiveData(uint8_t *, const uint8_t ) {}
448 void sx127xSetFrequencyReg(const uint32_t ) {}
449 void sx127xGetLastPacketStats(int8_t *rssi, int8_t *snr)
451 *rssi = 0;
452 *snr = 0;
454 void sx127xAdjustFrequency(int32_t *, const uint32_t ) {}
455 bool sx127xInit(IO_t , IO_t ) { return true; }
457 int scaleRange(int x, int srcFrom, int srcTo, int destFrom, int destTo) {
458 long int a = ((long int) destTo - (long int) destFrom) * ((long int) x - (long int) srcFrom);
459 long int b = (long int) srcTo - (long int) srcFrom;
460 return (a / b) + destFrom;
463 void expressLrsInitialiseTimer(TIM_TypeDef *, elrsReceiver_t *) {}
464 void expressLrsTimerEnableIRQs(void) {}
465 void expressLrsUpdateTimerInterval(uint16_t ) {}
466 void expressLrsUpdatePhaseShift(int32_t ) {}
467 void expressLrsTimerIncreaseFrequencyOffset(void) {}
468 void expressLrsTimerDecreaseFrequencyOffset(void) {}
469 void expressLrsTimerResetFrequencyOffset(void) {}
470 void expressLrsTimerStop(void) {}
471 void expressLrsTimerResume(void) {}
472 bool expressLrsTimerIsRunning(void) { return true; }
473 void expressLrsTimerDebug(void) {}
475 int32_t simpleLPFilterUpdate(simpleLowpassFilter_t *, int32_t ) { return 0; }
476 void simpleLPFilterInit(simpleLowpassFilter_t *, int32_t , int32_t ) {}
477 void dbgPinHi(int ) {}
478 void dbgPinLo(int ) {}
480 void initTelemetry(void) {}
481 bool getNextTelemetryPayload(uint8_t *, uint8_t **) { return false; }
483 void setTelemetryDataToTransmit(const uint8_t , uint8_t* ) {}
484 bool isTelemetrySenderActive(void) { return false; }
485 uint8_t getCurrentTelemetryPayload(uint8_t * ) { return 0; }
486 void confirmCurrentTelemetryPayload(const bool ) {}
487 void updateTelemetryRate(const uint16_t , const uint8_t , const uint8_t ) {}
489 void meanAccumulatorAdd(meanAccumulator_t * , const int8_t ) {};
490 int8_t meanAccumulatorCalc(meanAccumulator_t * , const int8_t defaultValue) { return defaultValue; };
491 void meanAccumulatorInit(meanAccumulator_t * ) {};