@@ -151,6 +151,24 @@ enum FrSkyDataState {
|
||||
#define RBOX_STATE_LAST_ID 0x0b2f
|
||||
#define RBOX_CNSP_FIRST_ID 0x0b30
|
||||
#define RBOX_CNSP_LAST_ID 0x0b3f
|
||||
#define SD1_FIRST_ID 0x0b40
|
||||
#define SD1_LAST_ID 0x0b4f
|
||||
#define ESC_POWER_FIRST_ID 0x0b50
|
||||
#define ESC_POWER_LAST_ID 0x0b5f
|
||||
#define ESC_RPM_CONS_FIRST_ID 0x0b60
|
||||
#define ESC_RPM_CONS_LAST_ID 0x0b6f
|
||||
#define ESC_TEMPERATURE_FIRST_ID 0x0b70
|
||||
#define ESC_TEMPERATURE_LAST_ID 0x0b7f
|
||||
#define X8R_FIRST_ID 0x0c20
|
||||
#define X8R_LAST_ID 0x0c2f
|
||||
#define S6R_FIRST_ID 0x0c30
|
||||
#define S6R_LAST_ID 0x0c3f
|
||||
#define GASSUIT_TEMP_FIRST_ID 0x0d00
|
||||
#define GASSUIT_TEMP_LAST_ID 0x0d0f
|
||||
#define GASSUIT_SPEED_FIRST_ID 0x0d10
|
||||
#define GASSUIT_SPEED_LAST_ID 0x0d1f
|
||||
#define GASSUIT_FUEL_FIRST_ID 0x0d20
|
||||
#define GASSUIT_FUEL_LAST_ID 0x0d2f
|
||||
#define DIY_FIRST_ID 0x5000
|
||||
#define DIY_LAST_ID 0x52ff
|
||||
#define DIY_STREAM_FIRST_ID 0x5000
|
||||
|
||||
@@ -63,6 +63,17 @@ const FrSkySportSensor sportSensors[] = {
|
||||
{ RBOX_CNSP_FIRST_ID, RBOX_CNSP_LAST_ID, 1, ZSTR_BATT2_CONSUMPTION, UNIT_MAH, 0 },
|
||||
{ RBOX_STATE_FIRST_ID, RBOX_STATE_LAST_ID, 0, ZSTR_CHANS_STATE, UNIT_BITFIELD, 0 },
|
||||
{ RBOX_STATE_FIRST_ID, RBOX_STATE_LAST_ID, 1, ZSTR_RB_STATE, UNIT_BITFIELD, 0 },
|
||||
{ SD1_FIRST_ID, SD1_LAST_ID, 0, ZSTR_SD1_CHANNEL, UNIT_RAW, 0 },
|
||||
{ ESC_POWER_FIRST_ID, ESC_POWER_LAST_ID, 0, ZSTR_ESC_VOLTAGE, UNIT_VOLTS, 2 },
|
||||
{ ESC_POWER_FIRST_ID, ESC_POWER_LAST_ID, 1, ZSTR_ESC_CURRENT, UNIT_AMPS, 2 },
|
||||
{ ESC_RPM_CONS_FIRST_ID, ESC_RPM_CONS_LAST_ID, 0, ZSTR_ESC_RPM, UNIT_RPMS, 0 },
|
||||
{ ESC_RPM_CONS_FIRST_ID, ESC_RPM_CONS_LAST_ID, 1, ZSTR_ESC_CONSUMPTION, UNIT_MAH, 0 },
|
||||
{ ESC_TEMPERATURE_FIRST_ID, ESC_TEMPERATURE_LAST_ID, 0, ZSTR_ESC_TEMP, UNIT_CELSIUS, 0 },
|
||||
{ GASSUIT_TEMP_FIRST_ID, GASSUIT_TEMP_LAST_ID, 0, ZSTR_GASSUIT_TEMP1, UNIT_CELSIUS, 0 },
|
||||
{ GASSUIT_TEMP_FIRST_ID, GASSUIT_TEMP_LAST_ID, 1, ZSTR_GASSUIT_TEMP2, UNIT_CELSIUS, 0 },
|
||||
{ GASSUIT_SPEED_FIRST_ID, GASSUIT_SPEED_LAST_ID, 0, ZSTR_GASSUIT_RPM, UNIT_RPMS, 0 },
|
||||
{ GASSUIT_FUEL_FIRST_ID, GASSUIT_FUEL_LAST_ID, 0, ZSTR_GASSUIT_FLOW, UNIT_MILLILITERS, 0 }, //TODO this needs to be changed to ml/min, but need eeprom conversion
|
||||
{ GASSUIT_FUEL_FIRST_ID, GASSUIT_FUEL_LAST_ID, 1, ZSTR_GASSUIT_CONS, UNIT_MILLILITERS, 0 },
|
||||
{ 0, 0, 0, NULL, UNIT_RAW, 0 } // sentinel
|
||||
};
|
||||
|
||||
@@ -210,6 +221,19 @@ void sportProcessTelemetryPacket(const uint8_t * packet)
|
||||
sportProcessTelemetryPacket(id, 0, instance, servosState);
|
||||
sportProcessTelemetryPacket(id, 1, instance, rboxState);
|
||||
}
|
||||
else if (id >= ESC_POWER_FIRST_ID && id <= ESC_RPM_CONS_LAST_ID) {
|
||||
// 2 sensors (POWER and RPM_CONS)
|
||||
sportProcessTelemetryPacket(id, 0, instance, data & 0xffff);
|
||||
sportProcessTelemetryPacket(id, 1, instance, data >> 16);
|
||||
}
|
||||
else if (id >= ESC_TEMPERATURE_FIRST_ID && id <= ESC_TEMPERATURE_LAST_ID) {
|
||||
sportProcessTelemetryPacket(id, 0, instance, data & 0x00ff);
|
||||
}
|
||||
else if (id >= GASSUIT_TEMP_FIRST_ID && id <= GASSUIT_FUEL_LAST_ID) {
|
||||
// 2 sensors
|
||||
sportProcessTelemetryPacket(id, 0, instance, data & 0xffff);
|
||||
sportProcessTelemetryPacket(id, 1, instance, data >> 16);
|
||||
}
|
||||
else if (id >= DIY_STREAM_FIRST_ID && id <= DIY_STREAM_LAST_ID) {
|
||||
#if defined(LUA)
|
||||
if (luaInputTelemetryFifo && luaInputTelemetryFifo->hasSpace(sizeof(SportTelemetryPacket))) {
|
||||
|
||||
@@ -1366,3 +1366,14 @@
|
||||
#define ZSTR_GATE_NUMBER "Gate"
|
||||
#define ZSTR_LAP_TIME "LapT"
|
||||
#define ZSTR_GATE_TIME "GteT"
|
||||
#define ZSTR_ESC_VOLTAGE "EscV"
|
||||
#define ZSTR_ESC_CURRENT "EscA"
|
||||
#define ZSTR_ESC_RPM "EscR"
|
||||
#define ZSTR_ESC_CONSUMPTION "EscC"
|
||||
#define ZSTR_ESC_TEMP "EscT"
|
||||
#define ZSTR_SD1_CHANNEL "Chan"
|
||||
#define ZSTR_GASSUIT_TEMP1 "GTp1"
|
||||
#define ZSTR_GASSUIT_TEMP2 "GTp2"
|
||||
#define ZSTR_GASSUIT_RPM "GRPM"
|
||||
#define ZSTR_GASSUIT_FLOW "GFlo"
|
||||
#define ZSTR_GASSUIT_CONS "GFue"
|
||||
|
||||
@@ -1374,3 +1374,14 @@
|
||||
#define ZSTR_GATE_NUMBER "Gate"
|
||||
#define ZSTR_LAP_TIME "LapT"
|
||||
#define ZSTR_GATE_TIME "GteT"
|
||||
#define ZSTR_ESC_VOLTAGE "EscV"
|
||||
#define ZSTR_ESC_CURRENT "EscA"
|
||||
#define ZSTR_ESC_RPM "EscR"
|
||||
#define ZSTR_ESC_CONSUMPTION "EscC"
|
||||
#define ZSTR_ESC_TEMP "EscT"
|
||||
#define ZSTR_SD1_CHANNEL "Chan"
|
||||
#define ZSTR_GASSUIT_TEMP1 "GTp1"
|
||||
#define ZSTR_GASSUIT_TEMP2 "GTp2"
|
||||
#define ZSTR_GASSUIT_RPM "GRPM"
|
||||
#define ZSTR_GASSUIT_FLOW "GFlo"
|
||||
#define ZSTR_GASSUIT_CONS "GFue"
|
||||
|
||||
@@ -1372,3 +1372,14 @@
|
||||
#define ZSTR_GATE_NUMBER "Gate"
|
||||
#define ZSTR_LAP_TIME "LapT"
|
||||
#define ZSTR_GATE_TIME "GteT"
|
||||
#define ZSTR_ESC_VOLTAGE "EscV"
|
||||
#define ZSTR_ESC_CURRENT "EscA"
|
||||
#define ZSTR_ESC_RPM "EscR"
|
||||
#define ZSTR_ESC_CONSUMPTION "EscC"
|
||||
#define ZSTR_ESC_TEMP "EscT"
|
||||
#define ZSTR_SD1_CHANNEL "Chan"
|
||||
#define ZSTR_GASSUIT_TEMP1 "GTp1"
|
||||
#define ZSTR_GASSUIT_TEMP2 "GTp2"
|
||||
#define ZSTR_GASSUIT_RPM "GRPM"
|
||||
#define ZSTR_GASSUIT_FLOW "GFlo"
|
||||
#define ZSTR_GASSUIT_CONS "GFue"
|
||||
|
||||
@@ -1344,3 +1344,14 @@
|
||||
#define ZSTR_GATE_NUMBER "Gate"
|
||||
#define ZSTR_LAP_TIME "LapT"
|
||||
#define ZSTR_GATE_TIME "GteT"
|
||||
#define ZSTR_ESC_VOLTAGE "EscV"
|
||||
#define ZSTR_ESC_CURRENT "EscA"
|
||||
#define ZSTR_ESC_RPM "EscR"
|
||||
#define ZSTR_ESC_CONSUMPTION "EscC"
|
||||
#define ZSTR_ESC_TEMP "EscT"
|
||||
#define ZSTR_SD1_CHANNEL "Chan"
|
||||
#define ZSTR_GASSUIT_TEMP1 "GTp1"
|
||||
#define ZSTR_GASSUIT_TEMP2 "GTp2"
|
||||
#define ZSTR_GASSUIT_RPM "GRPM"
|
||||
#define ZSTR_GASSUIT_FLOW "GFlo"
|
||||
#define ZSTR_GASSUIT_CONS "GFue"
|
||||
|
||||
@@ -1334,3 +1334,14 @@
|
||||
#define ZSTR_GATE_NUMBER "Gate"
|
||||
#define ZSTR_LAP_TIME "LapT"
|
||||
#define ZSTR_GATE_TIME "GteT"
|
||||
#define ZSTR_ESC_VOLTAGE "EscV"
|
||||
#define ZSTR_ESC_CURRENT "EscA"
|
||||
#define ZSTR_ESC_RPM "EscR"
|
||||
#define ZSTR_ESC_CONSUMPTION "EscC"
|
||||
#define ZSTR_ESC_TEMP "EscT"
|
||||
#define ZSTR_SD1_CHANNEL "Chan"
|
||||
#define ZSTR_GASSUIT_TEMP1 "GTp1"
|
||||
#define ZSTR_GASSUIT_TEMP2 "GTp2"
|
||||
#define ZSTR_GASSUIT_RPM "GRPM"
|
||||
#define ZSTR_GASSUIT_FLOW "GFlo"
|
||||
#define ZSTR_GASSUIT_CONS "GFue"
|
||||
|
||||
@@ -1373,3 +1373,14 @@
|
||||
#define ZSTR_GATE_NUMBER "Gate"
|
||||
#define ZSTR_LAP_TIME "LapT"
|
||||
#define ZSTR_GATE_TIME "GteT"
|
||||
#define ZSTR_ESC_VOLTAGE "EscV"
|
||||
#define ZSTR_ESC_CURRENT "EscA"
|
||||
#define ZSTR_ESC_RPM "EscR"
|
||||
#define ZSTR_ESC_CONSUMPTION "EscC"
|
||||
#define ZSTR_ESC_TEMP "EscT"
|
||||
#define ZSTR_SD1_CHANNEL "Chan"
|
||||
#define ZSTR_GASSUIT_TEMP1 "GTp1"
|
||||
#define ZSTR_GASSUIT_TEMP2 "GTp2"
|
||||
#define ZSTR_GASSUIT_RPM "GRPM"
|
||||
#define ZSTR_GASSUIT_FLOW "GFlo"
|
||||
#define ZSTR_GASSUIT_CONS "GFue"
|
||||
|
||||
@@ -1370,3 +1370,14 @@
|
||||
#define ZSTR_GATE_NUMBER "Gate"
|
||||
#define ZSTR_LAP_TIME "LapT"
|
||||
#define ZSTR_GATE_TIME "GteT"
|
||||
#define ZSTR_ESC_VOLTAGE "EscV"
|
||||
#define ZSTR_ESC_CURRENT "EscA"
|
||||
#define ZSTR_ESC_RPM "EscR"
|
||||
#define ZSTR_ESC_CONSUMPTION "EscC"
|
||||
#define ZSTR_ESC_TEMP "EscT"
|
||||
#define ZSTR_SD1_CHANNEL "Chan"
|
||||
#define ZSTR_GASSUIT_TEMP1 "GTp1"
|
||||
#define ZSTR_GASSUIT_TEMP2 "GTp2"
|
||||
#define ZSTR_GASSUIT_RPM "GRPM"
|
||||
#define ZSTR_GASSUIT_FLOW "GFlo"
|
||||
#define ZSTR_GASSUIT_CONS "GFue"
|
||||
|
||||
@@ -1367,3 +1367,14 @@
|
||||
#define ZSTR_GATE_NUMBER "Gate"
|
||||
#define ZSTR_LAP_TIME "LapT"
|
||||
#define ZSTR_GATE_TIME "GteT"
|
||||
#define ZSTR_ESC_VOLTAGE "EscV"
|
||||
#define ZSTR_ESC_CURRENT "EscA"
|
||||
#define ZSTR_ESC_RPM "EscR"
|
||||
#define ZSTR_ESC_CONSUMPTION "EscC"
|
||||
#define ZSTR_ESC_TEMP "EscT"
|
||||
#define ZSTR_SD1_CHANNEL "Chan"
|
||||
#define ZSTR_GASSUIT_TEMP1 "GTp1"
|
||||
#define ZSTR_GASSUIT_TEMP2 "GTp2"
|
||||
#define ZSTR_GASSUIT_RPM "GRPM"
|
||||
#define ZSTR_GASSUIT_FLOW "GFlo"
|
||||
#define ZSTR_GASSUIT_CONS "GFue"
|
||||
|
||||
@@ -1373,3 +1373,14 @@
|
||||
#define ZSTR_GATE_NUMBER "Gate"
|
||||
#define ZSTR_LAP_TIME "LapT"
|
||||
#define ZSTR_GATE_TIME "GteT"
|
||||
#define ZSTR_ESC_VOLTAGE "EscV"
|
||||
#define ZSTR_ESC_CURRENT "EscA"
|
||||
#define ZSTR_ESC_RPM "EscR"
|
||||
#define ZSTR_ESC_CONSUMPTION "EscC"
|
||||
#define ZSTR_ESC_TEMP "EscT"
|
||||
#define ZSTR_SD1_CHANNEL "Chan"
|
||||
#define ZSTR_GASSUIT_TEMP1 "GTp1"
|
||||
#define ZSTR_GASSUIT_TEMP2 "GTp2"
|
||||
#define ZSTR_GASSUIT_RPM "GRPM"
|
||||
#define ZSTR_GASSUIT_FLOW "GFlo"
|
||||
#define ZSTR_GASSUIT_CONS "GFue"
|
||||
|
||||
@@ -1347,3 +1347,14 @@
|
||||
#define ZSTR_GATE_NUMBER "Gate"
|
||||
#define ZSTR_LAP_TIME "LapT"
|
||||
#define ZSTR_GATE_TIME "GteT"
|
||||
#define ZSTR_ESC_VOLTAGE "EscV"
|
||||
#define ZSTR_ESC_CURRENT "EscA"
|
||||
#define ZSTR_ESC_RPM "EscR"
|
||||
#define ZSTR_ESC_CONSUMPTION "EscC"
|
||||
#define ZSTR_ESC_TEMP "EscT"
|
||||
#define ZSTR_SD1_CHANNEL "Chan"
|
||||
#define ZSTR_GASSUIT_TEMP1 "GTp1"
|
||||
#define ZSTR_GASSUIT_TEMP2 "GTp2"
|
||||
#define ZSTR_GASSUIT_RPM "GRPM"
|
||||
#define ZSTR_GASSUIT_FLOW "GFlo"
|
||||
#define ZSTR_GASSUIT_CONS "GFue"
|
||||
|
||||
@@ -1380,3 +1380,14 @@
|
||||
#define ZSTR_GATE_NUMBER "Gate"
|
||||
#define ZSTR_LAP_TIME "LapT"
|
||||
#define ZSTR_GATE_TIME "GteT"
|
||||
#define ZSTR_ESC_VOLTAGE "EscV"
|
||||
#define ZSTR_ESC_CURRENT "EscA"
|
||||
#define ZSTR_ESC_RPM "EscR"
|
||||
#define ZSTR_ESC_CONSUMPTION "EscC"
|
||||
#define ZSTR_ESC_TEMP "EscT"
|
||||
#define ZSTR_SD1_CHANNEL "Chan"
|
||||
#define ZSTR_GASSUIT_TEMP1 "GTp1"
|
||||
#define ZSTR_GASSUIT_TEMP2 "GTp2"
|
||||
#define ZSTR_GASSUIT_RPM "GRPM"
|
||||
#define ZSTR_GASSUIT_FLOW "GFlo"
|
||||
#define ZSTR_GASSUIT_CONS "GFue"
|
||||
|
||||
Reference in New Issue
Block a user