DEVICE=CMD PL
- will accept the "CMD PL-1" MIDI controller. Note that events are processed
- without looking at the channel number. This is so because for the Behringer
- controller, one can accidentally change the channel number by hitting a key.
+ will accept the "CMD PL-1" MIDI controller.
- The following lines all must contain one of the strings
"KEY=", "CTRL=", or "PITCH=". The syntax is as follows:
The syntay is
- KEY=<nr> ACTION=<action> <modifier>
+ KEY=<nr> CHAN=<chan> ACTION=<action> <modifier>
- where <nr> is the Number of the Midi Note
- and <action> is the key-word for a SDR "action" (see below)
+ where <nr> is the Number of the Midi Note, <chan> is the MIDI
+ channel where the event is expected.
+
+ The key words with the line can be given in any order. If
+ CHAN= is omitted, MIDI events from any channel are accepted.
+
+ <action> is the key-word for a SDR "action" (see below)
and <modifier> can be omitted, or can be the string "ONOFF".
If the "ONOFF" modifier is there, an action is taken both upon
Note-On and Note-Off events (usually: when pressing and releasing
generated, since the controller values are always in the range
0-127 and the threshold for fast and very-fast are never reached.
+ For wheels, there can be an additional directive DELAY=<delay>,
+ if this is given, it specifies a delay time (in msec) in which no
+ further WHEEL event is processed. If a wheel is used, for example,
+ to cycle through the filter settings, a delay takes care that this
+ does not go too fast.
+
PITCH: MIDI PITCH sliders
=========================
return 0;
}
-int ext_vfo_update(void *data) {
+static guint vfo_timeout=0;
+
+static int vfo_timeout_cb(void * data) {
+ vfo_timeout=0;
vfo_update();
return 0;
}
+int ext_vfo_update(void *data) {
+ if (vfo_timeout ==0) {
+ vfo_timeout=g_timeout_add(100, vfo_timeout_cb, NULL);
+ }
+ return 0;
+}
+
int ext_vfo_filter_changed(void *data) {
vfo_filter_changed((int)(uintptr_t)data);
return 0;
#include "receiver.h"
#include "vfo.h"
#include "button_text.h"
+#include "ext.h"
static GtkWidget *parent_window=NULL;
set_button_text_color(last_filter,"black");
last_filter=widget;
set_button_text_color(last_filter,"orange");
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
return FALSE;
}
#include "receiver.h"
#include "vfo.h"
#include "button_text.h"
+#include "ext.h"
static GtkWidget *parent_window=NULL;
static GtkWidget *dialog=NULL;
}
}
setFrequency(f);
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
set = 1;
}
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
return FALSE;
}
if(protocol==NEW_PROTOCOL) {
schedule_high_priority();
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
break;
case ENCODER_CW_SPEED:
value=(double)cw_keyer_speed;
value=60.0;
}
cw_keyer_speed=(int)value;
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
break;
case ENCODER_CW_FREQUENCY:
value=(double)cw_keyer_sidetone_frequency;
value=1000.0;
}
cw_keyer_sidetone_frequency=(int)value;
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
break;
case ENCODER_PANADAPTER_HIGH:
value=(double)active_receiver->panadapter_high;
//entry->frequency=entry->frequency+(pos*step);
//setFrequency(entry->frequency);
setFrequency(entry->frequency+ddsOffset+(pos*step));
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
free(data);
return 0;
#include "radio.h"
#include "vfo.h"
#include "button_text.h"
+#include "ext.h"
static GtkWidget *parent_window=NULL;
SetRXAEMNRRun(active_receiver->id, active_receiver->nr2);
SetRXAANFRun(active_receiver->id, active_receiver->anf);
SetRXASNBARun(active_receiver->id, active_receiver->snb);
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
static void nb_none_cb(GtkWidget *widget, gpointer data) {
#include "new_menu.h"
#include "radio.h"
#include "vfo.h"
+#include "ext.h"
static GtkWidget *parent_window=NULL;
static gboolean step_select_cb (GtkWidget *widget, gpointer data) {
step=steps[(uintptr_t)data];
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
return FALSE;
}
if(protocol==NEW_PROTOCOL) {
schedule_high_priority();
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
return TRUE;
}
}
vfo[id].ctun_frequency=vfo[id].frequency;
set_offset(active_receiver,vfo[id].offset);
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
static void atob_cb (GtkWidget *widget, gpointer data) {
} else {
tx_set_mode(transmitter,vfo[VFO_A].mode);
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
static void rit_enable_cb(GtkWidget *widget, gpointer data) {
if(protocol==NEW_PROTOCOL) {
schedule_high_priority();
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
static void rit_cb(GtkWidget *widget, gpointer data) {
if(protocol==NEW_PROTOCOL) {
schedule_high_priority();
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
if(i<0) {
rit_minus_timer=g_timeout_add(200,rit_timer_cb,(gpointer)(long)i);
} else {
static void rit_clear_cb(GtkWidget *widget, gpointer data) {
vfo[active_receiver->id].rit=0;
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
static void freq_cb(GtkWidget *widget, gpointer data) {
static void vox_cb(GtkWidget *widget, gpointer data) {
vox_enabled=vox_enabled==1?0:1;
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
static void stop() {
void lock_cb(GtkWidget *widget, gpointer data) {
locked=locked==1?0:1;
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
void mox_cb(GtkWidget *widget, gpointer data) {
function=0;
}
update_toolbar_labels();
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
GtkWidget *toolbar_init(int my_width, int my_height, GtkWidget* parent) {
static gint update_out_of_band(gpointer data) {
TRANSMITTER *tx=(TRANSMITTER *)data;
tx->out_of_band=0;
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
return FALSE;
}
usleep(100000);
tx->puresignal=0;
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
void tx_set_twotone(TRANSMITTER *tx,int state) {
tx_set_mode(transmitter,vfo[VFO_A].mode);
}
calcDriveLevel();
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
void vfo_bandstack_changed(int b) {
tx_set_mode(transmitter,vfo[VFO_A].mode);
}
calcDriveLevel();
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
tx_set_mode(transmitter,vfo[VFO_A].mode);
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
void vfo_filter_changed(int f) {
break;
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
void vfo_a_to_b() {
if(split) {
tx_set_mode(transmitter,vfo[VFO_B].mode);
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
void vfo_b_to_a() {
if(!split) {
tx_set_mode(transmitter,vfo[VFO_B].mode);
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
void vfo_a_swap_b() {
} else {
tx_set_mode(transmitter,vfo[VFO_A].mode);
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
void vfo_step(int steps) {
BANDSTACK_ENTRY* entry=bandstack_entry_get_current();
setFrequency(active_receiver->frequency+(steps*step));
#endif
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
}
break;
}
receiver_frequency_changed(active_receiver);
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
}
}
#endif
#endif
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
}
gpointer data)
{
step=steps[(int)data];
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
*/
}
}
setFrequency(f);
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
set = 1;
}
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
return FALSE;
}
rit_increment=100;
break;
}
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
static void vfo_cb(GtkComboBox *widget,gpointer data) {
step=steps[gtk_combo_box_get_active(widget)];
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
#ifdef FREEDV
static void lock_cb(GtkWidget *widget, gpointer data) {
locked=locked==1?0:1;
set_btn_state();
- vfo_update();
+ g_idle_add(ext_vfo_update,NULL);
}
static GtkWidget *last_mode;
#include "vfo.h"
#include "vox_menu.h"
#include "vox.h"
+#include "ext.h"
static GtkWidget *parent_window=NULL;
static gboolean enable_cb (GtkWidget *widget, GdkEventButton *event, gpointer data) {
vox_enabled=vox_enabled==1?0:1;
gtk_button_set_label(GTK_BUTTON(widget),vox_enabled==0?"VOX Enable":"VOX Disable");
- vfo_update();
+ g_idle_add(ext_vfo_update, (gpointer) 0);
return TRUE;
}