Send commands to set audio level and digu_offset when a slice enters FDV mode

This commit is contained in:
Ed Gonzalez 2015-09-04 11:25:25 -05:00
parent 6f8c45fac3
commit 367f54e3db
2 changed files with 10 additions and 1 deletions

View file

@ -312,6 +312,8 @@ uint32 register_mode(void)
output(ANSI_CYAN "FreeDV: SUCCESS, closed config file %s\n", cfg_file); output(ANSI_CYAN "FreeDV: SUCCESS, closed config file %s\n", cfg_file);
} }
tc_sendSmartSDRcommand("sub slice all", FALSE, NULL);
return SUCCESS; return SUCCESS;
} }

View file

@ -49,6 +49,7 @@ static void _handle_status(char* string)
char* start = strtok_r(string,"|",&save); char* start = strtok_r(string,"|",&save);
start = strtok_r(NULL,"|",&save); start = strtok_r(NULL,"|",&save);
// first let's look for a slice status -- these are most important // first let's look for a slice status -- these are most important
if (strncmp(start, "slice", strlen("slice")) == 0) if (strncmp(start, "slice", strlen("slice")) == 0)
{ {
@ -77,7 +78,13 @@ static void _handle_status(char* string)
if (strncmp(smode,"FDV",3) == 0) if (strncmp(smode,"FDV",3) == 0)
{ {
// we are now in FDV mode // we are now in FDV mode
output(ANSI_MAGENTA "slice %d is now in FDV mode\n",slc); output(ANSI_MAGENTA "slice %d is now in FDV mode - sendig commands\n",slc);
char cmd[512] = {0};
sprintf(cmd, "slice s %d digu_offset=1500", slc);
tc_sendSmartSDRcommand(cmd, FALSE, NULL);
sprintf(cmd, "audio client 0 slice %d gain 90", slc);
tc_sendSmartSDRcommand(cmd, FALSE, NULL);
} }
else else
{ {