mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-07-30 08:49:15 +02:00
attempt to fix looping
This commit is contained in:
+3
-1
@@ -6,7 +6,9 @@ uecp.rt_tx_remaining = 0
|
|||||||
hooks.rt_transmission[#hooks.rt_transmission + 1] = function ()
|
hooks.rt_transmission[#hooks.rt_transmission + 1] = function ()
|
||||||
if #uecp.rt_buffer == 0 then return end
|
if #uecp.rt_buffer == 0 then return end
|
||||||
|
|
||||||
if #uecp.rt_buffer > 1 and uecp.rt_tx_remaining > 1 then
|
if #uecp.rt_buffer == 1 then return end
|
||||||
|
|
||||||
|
if uecp.rt_tx_remaining > 1 then
|
||||||
uecp.rt_tx_remaining = uecp.rt_tx_remaining - 1
|
uecp.rt_tx_remaining = uecp.rt_tx_remaining - 1
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ void set_rds_rt(RDSEncoder* enc, const char *rt, uint8_t program) {
|
|||||||
enc->state[program].rt_update = 1;
|
enc->state[program].rt_update = 1;
|
||||||
|
|
||||||
memset(enc->data[program].rt, ' ', RT_LENGTH);
|
memset(enc->data[program].rt, ' ', RT_LENGTH);
|
||||||
while (*rt != 0 && len < RT_LENGTH) enc->data[program].rt[len++] = *rt++;
|
while (*rt != '\r' && *rt != 0 && len < RT_LENGTH) enc->data[program].rt[len++] = *rt++;
|
||||||
|
|
||||||
while (len > 0 && enc->data[program].rt[len - 1] == ' ') len--;
|
while (len > 0 && enc->data[program].rt[len - 1] == ' ') len--;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user