mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-27 12:53:53 +01:00
make it so i can save invidual options, like the piras
This commit is contained in:
@@ -365,10 +365,11 @@ static bool process_command_table(const command_handler_t *table, int table_size
|
||||
void process_ascii_cmd(RDSModulator* enc, unsigned char *str) {
|
||||
unsigned char *cmd, *arg;
|
||||
uint16_t cmd_len = _strnlen((const char*)str, CTL_BUFFER_SIZE);
|
||||
uint8_t to_save;
|
||||
|
||||
if (str[0] == '*') {
|
||||
saveToFile(enc->enc);
|
||||
return;
|
||||
to_save = 1;
|
||||
str++;
|
||||
}
|
||||
|
||||
if (cmd_len > 1 && str[1] == '=') {
|
||||
@@ -458,4 +459,16 @@ void process_ascii_cmd(RDSModulator* enc, unsigned char *str) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (to_save) {
|
||||
if (strncmp((const char*)&str[1], "ALL", 3) == 0) {
|
||||
saveToFile(enc->enc, "ALL");
|
||||
return;
|
||||
} else {
|
||||
char option[32] = {0};
|
||||
strncpy(option, (const char*)&str[1], sizeof(option) - 1);
|
||||
saveToFile(enc->enc, option);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user