You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2018/12/20 08:51:55 UTC
[mynewt-core] branch master updated: hw/drivers/bq27z561: Remove
double precision constant
This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 1b251c5 hw/drivers/bq27z561: Remove double precision constant
1b251c5 is described below
commit 1b251c55e5526d1a38ccde2893208105bf585b27
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Thu Dec 20 09:36:31 2018 +0100
hw/drivers/bq27z561: Remove double precision constant
Using 1.0 forced generated code to use double precision math,
while single precision was obviously meant to be used.
---
hw/drivers/bq27z561/src/bq27z561.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/drivers/bq27z561/src/bq27z561.c b/hw/drivers/bq27z561/src/bq27z561.c
index dc3c3b1..c693d64 100644
--- a/hw/drivers/bq27z561/src/bq27z561.c
+++ b/hw/drivers/bq27z561/src/bq27z561.c
@@ -66,7 +66,7 @@ bq27z561_temp_to_celsius(uint16_t temp)
{
float temp_c;
- temp_c = ((float)temp * 0.1) - 273;
+ temp_c = temp * 0.1f - 273.0f;
return temp_c;
}