]> git.tnoah.ca Git - lora-radio.git/commitdiff
Cleanup
authorMark Qvist <mark@unsigned.io>
Fri, 17 Jan 2025 09:44:46 +0000 (10:44 +0100)
committerMark Qvist <mark@unsigned.io>
Fri, 17 Jan 2025 09:44:46 +0000 (10:44 +0100)
sx126x.cpp

index c890c62b4e373fe047eaad7dfcbb5da5d033fc76..4c0686206624d5273b4f1021070571057fc4f2e1 100644 (file)
@@ -389,30 +389,12 @@ int sx126x::endPacket() {
   if (timed_out) { return 0; } else { return 1; }
 }
 
-/////////////////////////////////////////
-// #define PIN_PREAMBLE 46
-// #define PIN_HEADER 45
-// #define PIN_FALSE 48
-// #define PIN_DCD 47
-// bool ps = false;
-/////////////////////////////////////////
-
 unsigned long preamble_detected_at = 0;
 extern long lora_preamble_time_ms;
 extern long lora_header_time_ms;
 bool false_preamble_detected = false;
 
 bool sx126x::dcd() {
-  /////////////////////////////////////////
-  // if (!ps) {
-  //   pinMode(PIN_PREAMBLE, OUTPUT);
-  //   pinMode(PIN_HEADER, OUTPUT);
-  //   pinMode(PIN_FALSE, OUTPUT);
-  //   pinMode(PIN_DCD, OUTPUT);
-  //   ps = true;
-  // }
-  /////////////////////////////////////////
-
   uint8_t buf[2] = {0}; executeOpcodeRead(OP_GET_IRQ_STATUS_6X, buf, 2);
   uint32_t now = millis();
 
@@ -434,11 +416,6 @@ bool sx126x::dcd() {
     }
   }
 
-  // if (preamble_detected_at != 0) { digitalWrite(PIN_PREAMBLE, HIGH); } else { digitalWrite(PIN_PREAMBLE, LOW); }
-  // if (header_detected) { digitalWrite(PIN_HEADER, HIGH); } else { digitalWrite(PIN_HEADER, LOW); }
-  // if (false_preamble_detected) { digitalWrite(PIN_FALSE, HIGH); } else { digitalWrite(PIN_FALSE, LOW); }
-  // if (carrier_detected) { digitalWrite(PIN_DCD, HIGH); } else { digitalWrite(PIN_DCD, LOW); }
-
   // TODO: Maybe there's a way of unlatching the RSSI
   // status without re-activating receive mode?
   if (false_preamble_detected) { sx126x_modem.receive(); false_preamble_detected = false; }