mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
various: use float instead of double.
Add 'f' suffixes to some constants so they don't get silently promoted to double. Use roundf() instead of round(). Saves 208 bytes of flash. Signed-off-by: Michael Hope <mlhx@google.com>
This commit is contained in:
parent
084626a70f
commit
48024e512e
3 changed files with 5 additions and 5 deletions
|
@ -230,7 +230,7 @@ static void sendSatalliteSignalQualityAsTemperature2(void)
|
|||
if (telemetryConfig->frsky_unit == FRSKY_UNIT_METRICS) {
|
||||
serialize16(satellite);
|
||||
} else {
|
||||
float tmp = (satellite - 32) / 1.8;
|
||||
float tmp = (satellite - 32) / 1.8f;
|
||||
//Round the value
|
||||
tmp += (tmp < 0) ? -0.5f : 0.5f;
|
||||
serialize16(tmp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue