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
This commit is contained in:
Eric
2023-09-20 15:19:13 +02:00
parent 2ada887367
commit 0f4381d480
2 changed files with 2 additions and 1 deletions

View File

@@ -130,7 +130,7 @@ void ms_trx::submit_burst(blade_sample_type *buffer, int len, GSM::Time target)
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;

View File

@@ -258,6 +258,7 @@ void upper_trx::driveReceiveFIFO()
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())
};