Hoernchen submitted this change.
ms: adjust ts advance
..and fix the delay warning.
I'd rather have a proper fn advance of 1, but that breaks gprs, but just
slightly increasing the ts number is sufficient to fix issues with late
tx bursts that then get silently dropped by the sdr.
The mobile app does not care, and will happily work even with fn+3.
Change-Id: I46b3ea6b0094026bd50709739df464438f9e54c4
---
M Transceiver52M/ms/ms.cpp
M Transceiver52M/ms/ms_upper.cpp
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/Transceiver52M/ms/ms.cpp b/Transceiver52M/ms/ms.cpp
index ca41144..b8710a6 100644
--- a/Transceiver52M/ms/ms.cpp
+++ b/Transceiver52M/ms/ms.cpp
@@ -130,7 +130,7 @@
tosend.decTN(-diff_tn);
// in theory fn equal and tn+3 equal is also a problem...
- if (diff_fn < 0 || (diff_fn == 0 && (now_time.TN() - target_tn < 1))) {
+ if (diff_fn < 0 || (diff_fn == 0 && (target_tn-now_time.TN() < 3))) {
std::cerr << "## TX too late?! fn DIFF:" << diff_fn << " tn LOCAL: " << now_time.TN()
<< " tn OTHER: " << target_tn << std::endl;
return;
diff --git a/Transceiver52M/ms/ms_upper.cpp b/Transceiver52M/ms/ms_upper.cpp
index 63c222f..db15226 100644
--- a/Transceiver52M/ms/ms_upper.cpp
+++ b/Transceiver52M/ms/ms_upper.cpp
@@ -258,6 +258,7 @@
trxcon_phyif_handle_burst_ind(g_trxcon, &bi);
}
+ burstTime.incTN(2);
struct trxcon_phyif_rts_ind rts {
static_cast<uint32_t>(burstTime.FN()), static_cast<uint8_t>(burstTime.TN())
};
To view, visit change 34462. To unsubscribe, or for help writing mail filters, visit settings.