Explorar o código

fix the bt4 transmition rate computation

Dusan Zivkovic %!s(int64=2) %!d(string=hai) anos
pai
achega
a36288ffe7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      RemoteIDModule/RemoteIDModule.ino

+ 1 - 1
RemoteIDModule/RemoteIDModule.ino

@@ -402,7 +402,7 @@ void loop()
     static uint32_t last_update_bt4_ms;
     int bt4_states = UAS_data.BasicIDValid[1] ? 7 : 6;
     if (g.bt4_rate > 0 &&
-        now_ms - last_update_bt4_ms > (1000.0f/(bt4_states - 1))/g.bt4_rate) {
+        now_ms - last_update_bt4_ms > (1000.0f/bt4_states)/g.bt4_rate) {
         last_update_bt4_ms = now_ms;
         ble.transmit_legacy(UAS_data);
     }