RX turnaround timing

This commit is contained in:
Mark Qvist 2018-04-26 16:47:03 +02:00
parent be98b0d7f7
commit 8a604f911b
2 changed files with 7 additions and 6 deletions

View File

@ -46,7 +46,7 @@
const long serial_baudrate = 115200;
const int rssi_offset = 164;
const int lora_rx_turnaround_ms = 5;
const int lora_rx_turnaround_ms = 50;
// Default LoRa settings
int lora_sf = 0;

View File

@ -339,9 +339,7 @@ void updateModemStatus() {
void checkModemStatus() {
if (millis()-last_status_update >= status_interval_ms) {
led_tx_on();
updateModemStatus();
led_tx_off();
}
}
@ -352,9 +350,12 @@ void loop() {
if (!dcd_waiting) updateModemStatus();
if (!dcd && !dcd_led) {
if (dcd_waiting) delay(lora_rx_turnaround_ms);
updateModemStatus();
if (!dcd) {
outbound_ready = false;
dcd_waiting = false;
transmit(frame_len);
}
} else {
dcd_waiting = true;
}