int chan;
int t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12;
int onoff, delay;
- struct desc *desc, *dp;
+ struct desc *desc;
enum MIDItype type;
enum MIDIevent event;
char c;
break;
/////////////////////////////////////////////////////////// "RFGAIN"
case MIDI_ACTION_RF_GAIN: // knob or wheel supported
- if (type == MIDI_TYPE_KNOB) {
+ switch (type) {
+ case MIDI_TYPE_KNOB:
dnew=val;
- } else if (type == MIDI_TYPE_WHEEL) {
+ break;
+ case MIDI_TYPE_WHEEL:
dnew=adc[active_receiver->id].gain+val;
+ break;
+ default:
+ // Arriving here means there is an error somewhere else
+ dnew=0.0;
+ break;
}
if (dnew < 0.0) dnew = 0.0;
if (dnew > 100.0) dnew = 100.0;
-/* cOpyright (C)
+/* Copyright (C)
* 2020 - John Melton, G0ORX/N6LYT
*
* This program is free software; you can redistribute it and/or
GtkFileChooser *chooser;
GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_SAVE;
gint res;
- struct desc *cmd;
save_dialog = gtk_file_chooser_dialog_new ("Save File",
GTK_WINDOW(dialog),
GtkWidget *load_dialog;
GtkFileChooser *chooser;
GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
- gchar *filename;
gint res;
load_dialog = gtk_file_chooser_dialog_new ("Open MIDI File",
static int update(void *data) {
int state=GPOINTER_TO_INT(data);
gchar text[32];
- gint i=1;
- gint j;
switch(state) {
case UPDATE_NEW:
double mult;
long long f;
static int set = 0;
- SET_FREQUENCY *fp;
// Instead of messing with LOCALE settings,
// we print a "0.0" and look what the decimal
g_idle_add(ext_vfo_update,NULL);
}
-static GtkWidget *last_mode;
-
void vfo_menu(GtkWidget *parent,int vfo) {
int i;
gtk_misc_set_alignment (GTK_MISC (label), 1, .5);
gtk_grid_attach(GTK_GRID(grid),label,0,1,3,1);
- GtkWidget *step_rb=NULL;
for (i=0; i<16; i++) {
btn[i]=gtk_button_new_with_label(btn_labels[i]);
set_button_text_color(btn[i],"black");