Porównaj commity

...

2 Commity

Autor SHA1 Wiadomość Data
Peter Buchegger 72c33cbf9f
Merge pull request #132 from lora-aprs/fix_current_speed_bug
fix division by zero (current speed)
2023-11-25 19:19:59 +01:00
Peter Buchegger 04287e4e1f fix division by zero 2023-11-25 19:17:34 +01:00
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -367,6 +367,9 @@ void loop() {
would lead to decrease of beacon rate in between 5 to 20 km/h. what
is even below the slow speed rate.
*/
if (curr_speed == 0) {
curr_speed = 1;
}
txInterval = min(BeaconMan.getCurrentBeaconConfig()->smart_beacon.slow_rate,
BeaconMan.getCurrentBeaconConfig()->smart_beacon.fast_speed * BeaconMan.getCurrentBeaconConfig()->smart_beacon.fast_rate / curr_speed) *
1000;