mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2026-11-17 13:11:27 +01:00
Formater fixed for XDR data
This commit is contained in:
1 parent
3bc1068c14
commit
b29e3a972b
1 file changed
+8
@@ -372,7 +372,15 @@ FormatedData formatValue(GwApi::BoatValue *value, CommonData &commondata){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
if(value->value < 10){
|
||||||
|
snprintf(buffer,bsize,"%2.1f",value->value);
|
||||||
|
}
|
||||||
|
if(value->value >= 10 && value->value < 100){
|
||||||
|
snprintf(buffer,bsize,"%3.1f",value->value);
|
||||||
|
}
|
||||||
|
if(value->value >= 100){
|
||||||
snprintf(buffer,bsize,"%3.0f",value->value);
|
snprintf(buffer,bsize,"%3.0f",value->value);
|
||||||
|
}
|
||||||
result.unit = "";
|
result.unit = "";
|
||||||
}
|
}
|
||||||
buffer[bsize]=0;
|
buffer[bsize]=0;
|
||||||
|
|||||||
Reference in new issue
Block a user