mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
commit
4790bfc451
1 changed files with 14 additions and 1 deletions
|
@ -45,6 +45,8 @@
|
||||||
#define ID_GYRO_Y 0x41
|
#define ID_GYRO_Y 0x41
|
||||||
#define ID_GYRO_Z 0x42
|
#define ID_GYRO_Z 0x42
|
||||||
|
|
||||||
|
#define ID_VERT_SPEED 0x30 //opentx vario
|
||||||
|
|
||||||
// from sensors.c
|
// from sensors.c
|
||||||
extern uint8_t batteryCellCount;
|
extern uint8_t batteryCellCount;
|
||||||
|
|
||||||
|
@ -96,7 +98,7 @@ static void sendBaro(void)
|
||||||
sendDataHead(ID_ALTITUDE_BP);
|
sendDataHead(ID_ALTITUDE_BP);
|
||||||
serialize16(BaroAlt / 100);
|
serialize16(BaroAlt / 100);
|
||||||
sendDataHead(ID_ALTITUDE_AP);
|
sendDataHead(ID_ALTITUDE_AP);
|
||||||
serialize16(BaroAlt % 100);
|
serialize16(abs(BaroAlt % 100));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sendTemperature1(void)
|
static void sendTemperature1(void)
|
||||||
|
@ -135,6 +137,16 @@ static void sendGPS(void)
|
||||||
serialize16(GPS_coord[LON] < 0 ? 'W' : 'E');
|
serialize16(GPS_coord[LON] < 0 ? 'W' : 'E');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Send vertical speed for opentx. ID_VERT_SPEED
|
||||||
|
* Unit is cm/s
|
||||||
|
*/
|
||||||
|
static void sendVario(void)
|
||||||
|
{
|
||||||
|
sendDataHead(ID_VERT_SPEED);
|
||||||
|
serialize16(vario);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Send voltage via ID_VOLT
|
* Send voltage via ID_VOLT
|
||||||
*
|
*
|
||||||
|
@ -246,6 +258,7 @@ void sendTelemetry(void)
|
||||||
|
|
||||||
// Sent every 125ms
|
// Sent every 125ms
|
||||||
sendAccel();
|
sendAccel();
|
||||||
|
sendVario();
|
||||||
sendTelemetryTail();
|
sendTelemetryTail();
|
||||||
|
|
||||||
if ((cycleNum % 4) == 0) { // Sent every 500ms
|
if ((cycleNum % 4) == 0) { // Sent every 500ms
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue