feat: Add support for latest FrSky receivers (#4077)
Co-authored-by: Bertrand Songis <bsongis@gmail.com> Co-authored-by: raphaelcoeffic <raphael.coeffic@frafos.com>
This commit is contained in:
co-authored by
Bertrand Songis
raphaelcoeffic
parent
d684930cc9
commit
5fd22612aa
@@ -54,6 +54,8 @@ const FrSkySportSensor sportSensors[] = {
|
||||
FS( ACCX_FIRST_ID, ACCX_LAST_ID, 0, STR_SENSOR_ACCX, UNIT_G, 3 ),
|
||||
FS( ACCY_FIRST_ID, ACCY_LAST_ID, 0, STR_SENSOR_ACCY, UNIT_G, 3 ),
|
||||
FS( ACCZ_FIRST_ID, ACCZ_LAST_ID, 0, STR_SENSOR_ACCZ, UNIT_G, 3 ),
|
||||
FS( ANGLE_FIRST_ID, ANGLE_LAST_ID, 0, STR_SENSOR_ROLL, UNIT_DEGREE, 2 ),
|
||||
FS( ANGLE_FIRST_ID, ANGLE_LAST_ID, 1, STR_SENSOR_PITCH, UNIT_DEGREE, 2 ),
|
||||
FS( CURR_FIRST_ID, CURR_LAST_ID, 0, STR_SENSOR_CURR, UNIT_AMPS, 1 ),
|
||||
FS( VFAS_FIRST_ID, VFAS_LAST_ID, 0, STR_SENSOR_VFAS, UNIT_VOLTS, 2 ),
|
||||
FS( AIR_SPEED_FIRST_ID, AIR_SPEED_LAST_ID, 0, STR_SENSOR_ASPD, UNIT_KTS, 1 ),
|
||||
@@ -417,6 +419,10 @@ void sportProcessTelemetryPacketWithoutCrc(uint8_t module, uint8_t origin, const
|
||||
servosState = newServosState;
|
||||
}
|
||||
}
|
||||
else if (dataId >= ANGLE_FIRST_ID && dataId <= ANGLE_LAST_ID) {
|
||||
sportProcessTelemetryPacket(dataId, 0, instance, data & 0xFFFFu);
|
||||
sportProcessTelemetryPacket(dataId, 1, instance, data >> 16u);
|
||||
}
|
||||
else {
|
||||
sportProcessTelemetryPacket(dataId, 0, instance, data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user