mirror of
https://github.com/n5ac/smartsdr-dsp.git
synced 2025-12-06 03:01:59 +01:00
Send commands to set audio level and digu_offset when a slice enters FDV mode
This commit is contained in:
parent
6f8c45fac3
commit
367f54e3db
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue