]> git.tnoah.ca Git - lora-radio.git/commitdiff
Correct interface selection logic
authorjacob.eva <x00010@disroot.org>
Wed, 4 Sep 2024 17:25:36 +0000 (18:25 +0100)
committerjacob.eva <x00010@disroot.org>
Wed, 4 Sep 2024 17:25:36 +0000 (18:25 +0100)
RNode_Firmware_CE.ino

index e208b5c42667cb32e421ac60a3e333b9ce7f4081..c307f2870ca19225da442ff080df0eb500fccc8d 100644 (file)
@@ -1201,7 +1201,7 @@ void loop() {
         // loop, it still needs to be the first to transmit, so check if this
         // is the case.
         for (int j = 0; j < INTERFACE_COUNT; j++) {
-            if (!interface_obj_sorted[j]->calculateALock() || interface_obj_sorted[j]->getRadioOnline()) {
+            if (!interface_obj_sorted[j]->calculateALock() && interface_obj_sorted[j]->getRadioOnline()) {
                 if (interface_obj_sorted[j]->getBitrate() > selected_radio->getBitrate()) {
                     if (queue_height[interface_obj_sorted[j]->getIndex()] > 0) {
                         selected_radio = interface_obj_sorted[j];