Old S.PORT code removed
This commit is contained in:
@@ -74,11 +74,16 @@
|
||||
#define FRSKY_LAST_ID 0x3F
|
||||
|
||||
// FrSky new DATA IDs (2 bytes)
|
||||
#define RSSI_ID 0xf101
|
||||
#define ADC1_ID 0xf102
|
||||
#define ADC2_ID 0xf103
|
||||
#define BATT_ID 0xf104
|
||||
#define SWR_ID 0xf105
|
||||
#define ALT_FIRST_ID 0x0100
|
||||
#define ALT_LAST_ID 0x010f
|
||||
#define VARIO_FIRST_ID 0x0110
|
||||
#define VARIO_LAST_ID 0x011f
|
||||
#define CURR_FIRST_ID 0x0200
|
||||
#define CURR_LAST_ID 0x020f
|
||||
#define VFAS_FIRST_ID 0x0210
|
||||
#define VFAS_LAST_ID 0x021f
|
||||
#define CELLS_FIRST_ID 0x0300
|
||||
#define CELLS_LAST_ID 0x030f
|
||||
#define T1_FIRST_ID 0x0400
|
||||
#define T1_LAST_ID 0x040f
|
||||
#define T2_FIRST_ID 0x0410
|
||||
@@ -87,22 +92,12 @@
|
||||
#define RPM_LAST_ID 0x050f
|
||||
#define FUEL_FIRST_ID 0x0600
|
||||
#define FUEL_LAST_ID 0x060f
|
||||
#define ALT_FIRST_ID 0x0100
|
||||
#define ALT_LAST_ID 0x010f
|
||||
#define VARIO_FIRST_ID 0x0110
|
||||
#define VARIO_LAST_ID 0x011f
|
||||
#define ACCX_FIRST_ID 0x0700
|
||||
#define ACCX_LAST_ID 0x070f
|
||||
#define ACCY_FIRST_ID 0x0710
|
||||
#define ACCY_LAST_ID 0x071f
|
||||
#define ACCZ_FIRST_ID 0x0720
|
||||
#define ACCZ_LAST_ID 0x072f
|
||||
#define CURR_FIRST_ID 0x0200
|
||||
#define CURR_LAST_ID 0x020f
|
||||
#define VFAS_FIRST_ID 0x0210
|
||||
#define VFAS_LAST_ID 0x021f
|
||||
#define CELLS_FIRST_ID 0x0300
|
||||
#define CELLS_LAST_ID 0x030f
|
||||
#define GPS_LONG_LATI_FIRST_ID 0x0800
|
||||
#define GPS_LONG_LATI_LAST_ID 0x080f
|
||||
#define GPS_ALT_FIRST_ID 0x0820
|
||||
@@ -113,14 +108,17 @@
|
||||
#define GPS_COURS_LAST_ID 0x084f
|
||||
#define GPS_TIME_DATE_FIRST_ID 0x0850
|
||||
#define GPS_TIME_DATE_LAST_ID 0x085f
|
||||
|
||||
// Temporary IDs, will be changed when FrSky will have defined them in the S.PORT protocol
|
||||
#define A3_FIRST_ID 0x0900
|
||||
#define A3_LAST_ID 0x090f
|
||||
#define A4_FIRST_ID 0x0910
|
||||
#define A4_LAST_ID 0x091f
|
||||
#define AIR_SPEED_FIRST_ID 0x0a00
|
||||
#define AIR_SPEED_LAST_ID 0x0a0f
|
||||
|
||||
// FrSky wrong IDs ?
|
||||
#define BETA_VARIO_ID 0x8030
|
||||
#define BETA_BARO_ALT_ID 0x8010
|
||||
#define RSSI_ID 0xf101
|
||||
#define ADC1_ID 0xf102
|
||||
#define ADC2_ID 0xf103
|
||||
#define BATT_ID 0xf104
|
||||
#define SWR_ID 0xf105
|
||||
|
||||
void setBaroAltitude(int32_t baroAltitude)
|
||||
{
|
||||
@@ -331,14 +329,6 @@ void frskySportProcessPacket(uint8_t *packet)
|
||||
uint16_t value = HUB_DATA_U16(packet);
|
||||
processHubPacket(id, value);
|
||||
}
|
||||
else if (appId == BETA_BARO_ALT_ID) {
|
||||
int32_t baroAltitude = SPORT_DATA_S32(packet);
|
||||
setBaroAltitude(10 * (baroAltitude >> 8));
|
||||
}
|
||||
else if (appId == BETA_VARIO_ID) {
|
||||
int32_t varioSpeed = SPORT_DATA_S32(packet);
|
||||
frskyData.hub.varioSpeed = 10 * (varioSpeed >> 8);
|
||||
}
|
||||
else if (appId >= T1_FIRST_ID && appId <= T1_LAST_ID) {
|
||||
frskyData.hub.temperature1 = SPORT_DATA_S32(packet);
|
||||
if (frskyData.hub.temperature1 > frskyData.hub.maxTemperature1)
|
||||
@@ -473,7 +463,6 @@ void frskySportProcessPacket(uint8_t *packet)
|
||||
frskyData.hub.gpsFix = 0;
|
||||
}
|
||||
}
|
||||
|
||||
else if (appId >= CELLS_FIRST_ID && appId <= CELLS_LAST_ID) {
|
||||
uint32_t cells = SPORT_DATA_U32(packet);
|
||||
uint8_t battnumber = cells & 0xF;
|
||||
|
||||
Reference in New Issue
Block a user