#include "bandstack.h"
#include "noise_menu.h"
#include "wdsp.h"
+#include "ext.h"
// The following calls functions can be called usig g_idle_add
setDuplex();
return 0;
}
+
+int ext_set_rx_frequency(void *data) {
+ RX_FREQUENCY *p=(RX_FREQUENCY *)data;
+ int b = get_band_from_frequency(p->frequency);
+ if (b != vfo[p->rx].band) {
+ vfo_band_changed(b);
+ }
+ setFrequency(p->frequency);
+ g_free(data);
+ return 0;
+
+ return 0;
+}
+
+int ext_set_rx_mode(void *data) {
+ RX_MODE *p=(RX_MODE *)data;
+ vfo_mode_changed(p->mode);
+ return 0;
+}
+
+int ext_set_rx_filter(void *data) {
+ RX_FILTER *p=(RX_FILTER *)data;
+ vfo_filter_changed(p->filter);
+ return 0;
+}
+
// Use these calls from within the rigclt daemon, or the GPIO or MIDI stuff
//
+typedef struct _RX_FREQUENCY {
+ int rx;
+ long long frequency;
+} RX_FREQUENCY;
+
+typedef struct _RX_MODE {
+ int rx;
+ int mode;
+} RX_MODE;
+
+typedef struct _RX_FILTER {
+ int rx;
+ int filter;
+} RX_FILTER;
+
extern int ext_discovery(void *data);
extern int ext_vfo_update(void *data);
extern int ext_set_frequency(void *data);
#ifdef PURESIGNAL
int ext_start_ps(void *data);
#endif
+
+int ext_set_rx_frequency(void *data);
+int ext_set_rx_mode(void *data);
+int ext_set_rx_filter(void *data);
"SQUELCH RX1",
"SQUELCH RX2",
"COMP",
- "DIVERSITY GAIN COARSE",
- "DIVERSITY GAIN FINE",
- "DIVERSITY PHASE COARSE",
- "DIVERSITY PHASE FINE"};
+ "DIVERSITY GAIN",
+ "DIVERSITY PHASE"};
char *sw_string[SWITCH_ACTIONS] = {
"",
transmitter->compressor_level=(int)value;
set_compression(transmitter);
break;
- case ENCODER_DIVERSITY_GAIN_COARSE:
- update_diversity_gain_coarse((double)pos);
+ case ENCODER_DIVERSITY_GAIN:
+ update_diversity_gain((double)pos);
break;
- case ENCODER_DIVERSITY_GAIN_FINE:
- update_diversity_gain_fine((double)pos);
- break;
- case ENCODER_DIVERSITY_PHASE_COARSE:
- update_diversity_phase_coarse((double)pos);
- break;
- case ENCODER_DIVERSITY_PHASE_FINE:
- update_diversity_phase_fine((double)pos);
+ case ENCODER_DIVERSITY_PHASE:
+ update_diversity_phase((double)pos);
break;
}
}
ENCODER_SQUELCH_RX1,
ENCODER_SQUELCH_RX2,
ENCODER_COMP,
- ENCODER_DIVERSITY_GAIN_COARSE,
- ENCODER_DIVERSITY_GAIN_FINE,
- ENCODER_DIVERSITY_PHASE_COARSE,
- ENCODER_DIVERSITY_PHASE_FINE,
+ ENCODER_DIVERSITY_GAIN,
+ ENCODER_DIVERSITY_PHASE,
ENCODER_ACTIONS
};