wayne roberts / Mbed OS LoRaWAN_singlechannel_endnode

Dependencies:   SX127x sx12xx_hal TSL2561

Revision:
32:ac904adfc842
Parent:
31:6ed03f61af64
Child:
33:bc0b6be19e07
--- a/mac/LoRaMacSingle.cpp	Sun Dec 16 10:22:21 2018 -0800
+++ b/mac/LoRaMacSingle.cpp	Sun Dec 16 18:29:23 2018 +0000
@@ -1148,7 +1148,7 @@
                 BeaconCtx.last_BeaconRxTimerError_us = -PPM_BEACON_INTERVAL;
                 BeaconCtx.known_working_BeaconRxTimerError_us = -PPM_BEACON_INTERVAL;
                 /* first beacon reception needs to open for 30ms timing resolution */
-                BeaconCtx.Precess_symbols = ceil(TARGET_PRECESSION_us / BeaconCtx.symbol_period_us);
+                BeaconCtx.Precess_symbols = ceil((float)(TARGET_PRECESSION_us / BeaconCtx.symbol_period_us));
                 BeaconCtx.SymbolTimeout_us = PING_SLOT_RESOLUTION_us + (PPM_BEACON_INTERVAL * 4);   // error unknown at start
                 BeaconCtx.nSymbsTimeout = BeaconCtx.SymbolTimeout_us / BeaconCtx.symbol_period_us;
                 if (BeaconCtx.nSymbsTimeout < MIN_SYMBOL_TIMEOUT)