Port of TBS's changes for module scoped telemetry

This commit is contained in:
Raphael Coeffic
2021-11-21 11:18:35 +01:00
committed by Raphael Coeffic
parent 620a43a9c3
commit 2abf07ed9b
12 changed files with 159 additions and 89 deletions
+8 -1
View File
@@ -36,6 +36,8 @@
#define BATTERY_ID 0x08
#define LINK_ID 0x14
#define CHANNELS_ID 0x16
#define LINK_RX_ID 0x1C
#define LINK_TX_ID 0x1D
#define ATTITUDE_ID 0x1E
#define FLIGHT_MODE_ID 0x21
#define PING_DEVICES_ID 0x28
@@ -67,6 +69,11 @@ enum CrossfireSensorIndexes {
TX_RSSI_INDEX,
TX_QUALITY_INDEX,
TX_SNR_INDEX,
RX_RSSI_PERC_INDEX,
RX_RF_POWER_INDEX,
TX_RSSI_PERC_INDEX,
TX_RF_POWER_INDEX,
TX_FPS_INDEX,
BATT_VOLTAGE_INDEX,
BATT_CURRENT_INDEX,
BATT_CAPACITY_INDEX,
@@ -91,7 +98,7 @@ enum CrossfireFrames{
CRSF_FRAME_MODELID_SENT
};
void processCrossfireTelemetryData(uint8_t data);
void processCrossfireTelemetryData(uint8_t data, uint8_t module);
void crossfireSetDefault(int index, uint8_t id, uint8_t subId);
uint8_t createCrossfireModelIDFrame(uint8_t * frame);