}
#endif
+int ext_update_vfo_step(void *data) {
+ int direction=GPOINTER_TO_INT(data);
+ int i=0;
+ while(steps[i]!=step && steps[i]!=0) {
+ i++;
+ }
+
+ if(steps[i]!=0) {
+ if(direction>0) {
+ i++;
+ if(steps[i]!=0) {
+ step=steps[i];
+ vfo_update();
+ }
+ } else {
+ i--;
+ if(i>=0) {
+ step=steps[i];
+ vfo_update();
+ }
+ }
+ }
+ return 0;
+}
+
int ext_vfo_step(void *data) {
int step=GPOINTER_TO_INT(data);
vfo_step(step);
extern int ext_tx_set_ps(void *data);
#endif
+int ext_update_vfo_step(void *data);
int ext_vfo_step(void *data);
int ext_vfo_mode_changed(void *data);
int ext_set_af_gain(void *data);
VFO, // change VFO frequency
VFO_A2B, // VFO A -> B
VFO_B2A, // VFO B -> A
- VOX // VOX on/off
+ VOX, // VOX on/off
+ VFO_STEP_UP, // cycle through vfo steps upwards;
+ VFO_STEP_DOWN, // cycle through vfo steps downwards;
};
//
{ VFO_A2B, "VFOA2B"},
{ VFO_B2A, "VFOB2A"},
{ VOX, "VOX"},
+ { VFO_STEP_UP, "VFOSTEPUP"},
+ { VFO_STEP_DOWN, "VFOSTEPDOWN"},
{ ACTION_NONE, "NONE"},
{ ACTION_NONE, NULL}
};
active_receiver->agc=new;
g_idle_add(ext_vfo_update, NULL);
break;
+ case VFO_STEP_UP:
+ g_idle_add(ext_update_vfo_step, GINT_TO_POINTER(1));
+ break;
+ case VFO_STEP_DOWN:
+ g_idle_add(ext_update_vfo_step, GINT_TO_POINTER(-1));
+ break;
case ACTION_NONE:
// No error message, this is the "official" action for un-used controller buttons.
break;