Add guard for GPS in OSD

This commit is contained in:
borisbstyle 2016-11-30 22:05:29 +01:00 committed by GitHub
parent 84b79b1789
commit 44d249f054
1 changed files with 3 additions and 2 deletions

View File

@ -508,9 +508,10 @@ static void osdResetStats(void)
static void osdUpdateStats(void)
{
int16_t value;
int16_t value = 0;
#ifdef GPS
value = GPS_speed * 36 / 1000;
#endif
if (stats.max_speed < value)
stats.max_speed = value;