From 2c8c1f856b866d6a8ac6af80779d0ef9b4bb80df Mon Sep 17 00:00:00 2001 From: bsongis Date: Sun, 6 May 2012 10:33:03 +0000 Subject: [PATCH] KTS to KMH conversion was going over int16_t limits --- src/open9x.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/open9x.cpp b/src/open9x.cpp index 15af1eb3c..4e57f4f04 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -693,7 +693,7 @@ void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t #else if (unit == UNIT_KTS) { // kts to km/h - val = (val * 463) / 250; + val = (val * 46) / 25; } #endif lcd_outdezAtt(x, (att & DBLSIZE ? y - FH : y), val, att & (~NO_UNIT)); // TODO we could add this test inside lcd_outdezAtt!