Browse Source

Some debugging for GPIO based DCD

master
Jeroen Vreeken 2 years ago
parent
commit
4015685a21
3 changed files with 7 additions and 8 deletions
  1. +2
    -1
      freedv_eth.c
  2. +4
    -6
      io.c
  3. +1
    -1
      io.h

+ 2
- 1
freedv_eth.c View File

@ -326,6 +326,7 @@ int main(int argc, char **argv)
rig_model = atoi(freedv_eth_config_value("rig_model", NULL, "1"));
char *rig_file = freedv_eth_config_value("rig_file", NULL, NULL);
char *ptt_file = freedv_eth_config_value("rig_ptt_file", NULL, NULL);
char *dcd_file = freedv_eth_config_value("rig_dcd_file", NULL, NULL);
vc_control = atoi(freedv_eth_config_value("control_vc", NULL, "0"));
char *rig_ptt_type = freedv_eth_config_value("rig_ptt_type", NULL, "NONE");
char *rig_dcd_type = freedv_eth_config_value("rig_dcd_type", NULL, "NONE");
@ -461,7 +462,7 @@ int main(int argc, char **argv)
else
dcd_type = atoi(rig_dcd_type);
io_hl_init(rig_model, dcd_threshold, ptt_type, ptt_file, dcd_type, rig_file);
io_hl_init(rig_model, dcd_threshold, ptt_type, ptt_file, dcd_type, dcd_file, rig_file);
type = freedv_eth_mode2type(freedv_mode);


+ 4
- 6
io.c View File

@ -256,7 +256,7 @@ void *io_hl_rig_thread(void *arg)
}
}
int io_hl_init(rig_model_t rig_model, int dcd_th, ptt_type_t ptt, char *ptt_file, dcd_type_t dcd, char *rig_file)
int io_hl_init(rig_model_t rig_model, int dcd_th, ptt_type_t ptt, char *ptt_file, dcd_type_t dcd, char *dcd_file, char *rig_file)
{
int retcode;
ptt_type = ptt;
@ -264,8 +264,7 @@ int io_hl_init(rig_model_t rig_model, int dcd_th, ptt_type_t ptt, char *ptt_file
dcd_threshold = dcd_th;
int verbose = 1;
rig_set_debug(verbose);
rig_set_debug(RIG_DEBUG_WARN);
rig = rig_init(rig_model);
if (!rig) {
@ -279,8 +278,8 @@ int io_hl_init(rig_model_t rig_model, int dcd_th, ptt_type_t ptt, char *ptt_file
if (ptt_file)
strncpy(rig->state.pttport.pathname, ptt_file, FILPATHLEN - 1);
if (ptt_file)
strncpy(rig->state.dcdport.pathname, ptt_file, FILPATHLEN - 1);
if (dcd_file)
strncpy(rig->state.dcdport.pathname, dcd_file, FILPATHLEN - 1);
if (rig_file)
strncpy(rig->state.rigport.pathname, rig_file, FILPATHLEN - 1);
@ -309,7 +308,6 @@ int io_hl_init(rig_model_t rig_model, int dcd_th, ptt_type_t ptt, char *ptt_file
}
}
retcode = rig_open(rig);
if (retcode != RIG_OK) {
fprintf(stderr,"rig_open: error = %s \n", rigerror(retcode));


+ 1
- 1
io.h View File

@ -32,7 +32,7 @@ int io_poll_fill(struct pollfd *fds, int count);
bool io_state_rx_get(void);
int io_handle(struct pollfd *fds, int count, void (*cb_control)(char *));
int io_hl_init(rig_model_t rig_model, int dcd_th, ptt_type_t ptt, char *ptt_file, dcd_type_t dcd, char *rig_file);
int io_hl_init(rig_model_t rig_model, int dcd_th, ptt_type_t ptt, char *ptt_file, dcd_type_t dcd, char *dcd_file, char *rig_file);
bool io_hl_dcd_get(void);


Loading…
Cancel
Save