mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-27 04:43:52 +01:00
try to fix
This commit is contained in:
@@ -398,7 +398,7 @@ static void handle_init(char *arg, RDSModulator* mod, char* output) {
|
||||
static void handle_ver(char *arg, RDSModulator* mod, char* output) {
|
||||
(void)arg;
|
||||
(void)mod;
|
||||
strcpy(output, "Firmware v. 0.0a - (C) 2025 radio95\0");
|
||||
strcpy(output, "Firmware v. 1.1a - (C) 2025 radio95\0");
|
||||
}
|
||||
|
||||
static void handle_eonen(char *arg, char *pattern, RDSModulator* mod, char* output) {
|
||||
@@ -559,10 +559,10 @@ static bool process_pattern_commands(char *cmd, char *arg, char *output, RDSModu
|
||||
size_t prefix_len = strlen(handler->prefix);
|
||||
size_t suffix_len = strlen(handler->suffix);
|
||||
|
||||
if (cmd_len >= (prefix_len + suffix_len) &&
|
||||
if (cmd_len > (prefix_len + suffix_len) &&
|
||||
strncmp(cmd, handler->prefix, prefix_len) == 0 &&
|
||||
strcmp(cmd + cmd_len - suffix_len, handler->suffix) == 0) {
|
||||
|
||||
|
||||
size_t pattern_len = cmd_len - prefix_len - suffix_len;
|
||||
if (pattern_len < sizeof(pattern_buffer)) {
|
||||
strncpy(pattern_buffer, cmd + prefix_len, pattern_len);
|
||||
|
||||
@@ -520,8 +520,8 @@ static void get_rds_group(RDSEncoder* enc, uint16_t *blocks) {
|
||||
time(&now);
|
||||
utc = gmtime(&now);
|
||||
|
||||
if (utc->tm_min != enc->state[enc->program].last_ct_minute) {
|
||||
enc->state[enc->program].last_ct_minute = utc->tm_min;
|
||||
if (utc->tm_min != enc->state[enc->program].last_minute) {
|
||||
enc->state[enc->program].last_minute = utc->tm_min;
|
||||
uint8_t eon_has_ta = 0;
|
||||
for (int i = 0; i < EONS; i++) {
|
||||
if (enc->data[enc->program].eon[i].enabled && enc->data[enc->program].eon[i].ta) {
|
||||
@@ -699,12 +699,11 @@ void reset_rds_state(RDSEncoder* enc, uint8_t program) {
|
||||
set_rds_lps(&tempCoder, enc->data[program].lps);
|
||||
set_rds_grpseq(&tempCoder, enc->data[program].grp_sqc);
|
||||
|
||||
|
||||
struct tm *utc;
|
||||
time_t now;
|
||||
time(&now);
|
||||
utc = gmtime(&now);
|
||||
enc->state[program].last_ct_minute = utc->tm_min;
|
||||
enc->state[program].last_minute = utc->tm_min;
|
||||
|
||||
for(int i = 0; i < EONS; i++) {
|
||||
tempCoder.data[program].eon[i].ta = 0;
|
||||
|
||||
@@ -193,7 +193,7 @@ typedef struct {
|
||||
uint8_t grp_seq_idx[2];
|
||||
uint8_t udg_idxs[2];
|
||||
|
||||
uint8_t last_ct_minute : 6;
|
||||
uint8_t last_minute : 6;
|
||||
uint8_t ta_timeout : 7;
|
||||
|
||||
uint8_t eon_index : 3;
|
||||
|
||||
@@ -32,7 +32,7 @@ static void *control_pipe_worker(void* modulator) {
|
||||
}
|
||||
|
||||
static void show_version() {
|
||||
printf("rds95 (a RDS encoder by radio95) version 1.0\n");
|
||||
printf("rds95 (a RDS encoder by radio95) version 1.1\n");
|
||||
}
|
||||
|
||||
static void show_help(char *name) {
|
||||
|
||||
Reference in New Issue
Block a user