Add tlmConfirm to tlm_dl ota packet-structure (#2991)
[ExpressLRS.git] / src / include / dynpower.h
blobba89a968a86735b9a7abd81da5df04bd13f5e0ed
1 #pragma once
3 #include <stdint.h>
4 #include <config.h>
5 #include <POWERMGNT.h>
6 #include <CRSF.h>
7 #include <logging.h>
9 #if defined(TARGET_TX)
11 #include <MeanAccumulator.h>
13 #define DYNPOWER_UPDATE_NOUPDATE -128
14 #define DYNPOWER_UPDATE_MISSED -127
16 // Call DynamicPower_Init in setup()
17 void DynamicPower_Init();
18 // Call DynamicPower_Update from loop()
19 void DynamicPower_Update(uint32_t now);
20 // Call DynamicPower_TelemetryUpdate from ISR with DYNPOWER_UPDATE_MISSED or ScaledSNR value
21 void DynamicPower_TelemetryUpdate(int8_t snrScaled);
23 #endif // TARGET_TX
25 #if defined(TARGET_RX)
27 // Call DynamicPower_UpdateRx from loop()
28 void DynamicPower_UpdateRx(bool initialize);
30 #endif // TARGET_RX