1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Telemetry: Send opentx variometer values.

Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>
This commit is contained in:
Moritz Ulrich 2013-11-25 02:57:53 +01:00
parent b12e98316c
commit 5c733665de

View file

@ -45,6 +45,8 @@
#define ID_GYRO_Y 0x41
#define ID_GYRO_Z 0x42
#define ID_VERT_SPEED 0x30 //opentx vario
// from sensors.c
extern uint8_t batteryCellCount;
@ -135,6 +137,16 @@ static void sendGPS(void)
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
*
@ -246,6 +258,7 @@ void sendTelemetry(void)
// Sent every 125ms
sendAccel();
sendVario();
sendTelemetryTail();
if ((cycleNum % 4) == 0) { // Sent every 500ms