diff options
author | Anthony Stange <stange@google.com> | 2020-03-27 10:12:26 -0400 |
---|---|---|
committer | Anthony Stange <stange@google.com> | 2020-03-27 10:13:48 -0400 |
commit | a5757117a2538745ae2b15696c2a236be99fc93a (patch) | |
tree | da53a2f420df376bfca44259e58a73b6a2ae2fbd /apps | |
parent | 3750470c534ccadb21e7266165be66774248571d (diff) | |
download | chre-a5757117a2538745ae2b15696c2a236be99fc93a.tar.gz |
Fix build errors when running run_sim.sh
- Adds missing comma in a variant's static_nanoapps.cc file
- Adds various static_casts to ensure ints are implicitly casted to
floats
Bug: 152601896
Test: ./run_sim.sh, ./load_chre.sh
Change-Id: Iabdf14978bd8f61adb1d2c415372dc4dddd074e4
Diffstat (limited to 'apps')
-rw-r--r-- | apps/wifi_world/wifi_world.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/wifi_world/wifi_world.cc b/apps/wifi_world/wifi_world.cc index 0db698b9..a53983b9 100644 --- a/apps/wifi_world/wifi_world.cc +++ b/apps/wifi_world/wifi_world.cc @@ -156,11 +156,12 @@ void logChreRangingResult(const chreWifiRangingResult &result) { if (result.flags & CHRE_WIFI_RTT_RESULT_HAS_LCI) { const chreWifiRangingResult::chreWifiLci lci = result.lci; LOGI(" latitude: 0x%" PRIx64 ", %f degs", lci.latitude, - lci.latitude / static_cast<float>(1 << 25)); + static_cast<float>(lci.latitude) / static_cast<float>(1 << 25)); LOGI(" longitude: 0x%" PRIx64 ", %f degs", lci.longitude, - lci.longitude / static_cast<float>(1 << 25)); + static_cast<float>(lci.longitude) / static_cast<float>(1 << 25)); - float altitude = lci.altitude / static_cast<float>(1 << 8); + float altitude = + static_cast<float>(lci.altitude) / static_cast<float>(1 << 8); if (lci.altitudeType == CHRE_WIFI_LCI_UNCERTAINTY_UNKNOWN) { LOGI(" altitude: unknown"); } else if (lci.altitudeType == CHRE_WIFI_LCI_ALTITUDE_TYPE_METERS) { |