]> git.tnoah.ca Git - lora-radio.git/commitdiff
Cleanup
authorMark Qvist <mark@unsigned.io>
Wed, 8 Jan 2025 16:44:30 +0000 (17:44 +0100)
committerMark Qvist <mark@unsigned.io>
Wed, 8 Jan 2025 16:44:30 +0000 (17:44 +0100)
Config.h
RNode_Firmware.ino

index 121843597ea57013038b50e808af408e2986421c..2869c6176dc0806f8de9260e2c43ac8de608d607 100644 (file)
--- a/Config.h
+++ b/Config.h
        uint32_t last_status_update = 0;
        uint32_t last_dcd = 0;
 
-       // Status flags
-       const uint8_t SIG_DETECT = 0x01;
-       const uint8_t SIG_SYNCED = 0x02;
-       const uint8_t RX_ONGOING = 0x04;
-
     // Power management
     #define BATTERY_STATE_UNKNOWN     0x00
     #define BATTERY_STATE_DISCHARGING 0x01
index 36c20c2a382cdbd674afe273e7f0a41adb45e73d..880aed5f376d4afa306e383b5cc9454eab0f0e58 100644 (file)
@@ -1371,17 +1371,12 @@ void tx_queue_handler() {
       else {                                                                      // Medium is free, so continue waiting
         if (millis() < difs_wait_start+difs_ms) { return; }                       // DIFS has not yet passed, continue waiting
         else {                                                                    // DIFS has passed, and we are now in CW wait
-          digitalWrite(PIN_DIFS, LOW);
           if (cw_wait_start == -1) { cw_wait_start = millis(); return; }          // If we haven't started counting CW wait time, do it from now
           else {                                                                  // If we are already counting CW wait time, add it to the counter
             cw_wait_passed += millis()-cw_wait_start; cw_wait_start   = millis();
             if (cw_wait_passed < cw_wait_target) { return; }                      // Contention window wait time has not yet passed, continue waiting
             else {                                                                // Wait time has passed, flush the queue
-              digitalWrite(PIN_FLUSH, HIGH);
-              digitalWrite(PIN_CW, LOW);
               flush_queue();
-              digitalWrite(PIN_FLUSH, LOW);
-              digitalWrite(PIN_DIFS, LOW);
               cw_wait_passed = 0; csma_cw = -1; difs_wait_start = -1; }
 
           }