diff --git a/src/telemetry.c b/src/telemetry.c index 1ab9cabd37..39c251539d 100644 --- a/src/telemetry.c +++ b/src/telemetry.c @@ -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