Reverted change to speed reporting.

This commit is contained in:
Michael Keller 2016-12-08 16:37:57 +13:00
parent e88eba1009
commit ccb155fc8e
2 changed files with 2 additions and 9 deletions

View File

@ -78,7 +78,6 @@
#include "flight/pid.h"
#include "flight/navigation.h"
#include "flight/altitudehold.h"
#include "io/gps.h"
#include "telemetry/telemetry.h"
@ -196,13 +195,8 @@ void hottPrepareGPSResponse(HOTT_GPS_MSG_t *hottGPSMessage)
addGPSCoordinates(hottGPSMessage, GPS_coord[LAT], GPS_coord[LON]);
uint16_t speed = GPS_speed;
if (!STATE(GPS_FIX)) {
speed = vario;
}
// Speed is returned in cm/s and must be sent in km/h (Hott requirement)
speed = (speed * 36) / 1000;
// GPS Speed is returned in cm/s (from io/gps.c) and must be sent in km/h (Hott requirement)
const uint16_t speed = (GPS_speed * 36) / 1000;
hottGPSMessage->gps_speed_L = speed & 0x00FF;
hottGPSMessage->gps_speed_H = speed >> 8;

View File

@ -174,7 +174,6 @@ int32_t mAhDrawn;
uint32_t fixedMillis = 0;
baro_t baro;
uint16_t vario;
uint32_t millis(void) {
return fixedMillis;