mirror of https://github.com/wb2osz/direwolf.git
Config changes for TXINH
This commit is contained in:
parent
b14f1d0ff2
commit
dd2d740787
6
audio.h
6
audio.h
|
@ -198,6 +198,12 @@ struct audio_s {
|
||||||
|
|
||||||
} octrl[NUM_OCTYPES];
|
} octrl[NUM_OCTYPES];
|
||||||
|
|
||||||
|
struct {
|
||||||
|
int enabled;
|
||||||
|
int gpio;
|
||||||
|
int invert;
|
||||||
|
} txinh;
|
||||||
|
|
||||||
/* Transmit timing. */
|
/* Transmit timing. */
|
||||||
|
|
||||||
int dwait; /* First wait extra time for receiver squelch. */
|
int dwait; /* First wait extra time for receiver squelch. */
|
||||||
|
|
24
config.c
24
config.c
|
@ -1450,6 +1450,30 @@ void config_init (char *fname, struct audio_s *p_audio_config,
|
||||||
|
|
||||||
} /* end of PTT */
|
} /* end of PTT */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TXINH - Input for TX inhibit signal
|
||||||
|
*/
|
||||||
|
|
||||||
|
else if (strcasecmp(t, "TXINH") == 0) {
|
||||||
|
t = strtok (NULL, " ,\t\n\r");
|
||||||
|
if (t == NULL) {
|
||||||
|
text_color_set(DW_COLOR_ERROR);
|
||||||
|
dw_printf ("Config file line %d: Missing GPIO number for TXINH.\n",
|
||||||
|
line);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_audio_config->achan[channel].txinh.enabled = 1;
|
||||||
|
|
||||||
|
if (*t == '-') {
|
||||||
|
p_audio_config->achan[channel].txinh.gpio = atoi(t+1);
|
||||||
|
p_audio_config->achan[channel].txinh.invert = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
p_audio_config->achan[channel].txinh.gpio = atoi(t);
|
||||||
|
p_audio_config->achan[channel].txinh.invert = 0;
|
||||||
|
}
|
||||||
|
} /* end of TXINH */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DWAIT - Extra delay for receiver squelch.
|
* DWAIT - Extra delay for receiver squelch.
|
||||||
|
|
Loading…
Reference in New Issue