Update Devo_cyrf6936.ino

This commit is contained in:
Pascal Langer 2021-03-02 18:32:02 +01:00
parent 07df1a8959
commit d7c24d62ed

View File

@ -185,16 +185,18 @@ static void __attribute__((unused)) DEVO_float_to_ints(uint8_t *ptr, uint16_t *v
} }
if(ptr[i] < '0' || ptr[i] > '9') if(ptr[i] < '0' || ptr[i] > '9')
{ {
if(value!=0 || seen_decimal) if(*value != 0 || seen_decimal)
break; return;
continue;
} }
else
{
if(seen_decimal) if(seen_decimal)
*decimal = *decimal * 10 + (ptr[i] - '0'); *decimal = *decimal * 10 + (ptr[i] - '0');
else else
*value = *value * 10 + (ptr[i] - '0'); *value = *value * 10 + (ptr[i] - '0');
} }
} }
}
static void __attribute__((unused)) DEVO_parse_telemetry_packet() static void __attribute__((unused)) DEVO_parse_telemetry_packet()
{ // Telemetry packets every 2.4ms { // Telemetry packets every 2.4ms