Add missing effects to modifier array.
Change AMP_POSITION to AMP_A_POSITION. Add AMP_B_POSITION to the modifier array. Add AMP_PRESENCE to the modifier array and move it to follow Treble in the Equalizer effect. Add EQ_B_POSITION settings to the modifier array. Change the formatting of the debug messages to print more readable columns. Conflicts: gdigi.c
This commit is contained in:
52
gdigi.c
52
gdigi.c
@@ -250,7 +250,7 @@ void push_message(GString *msg)
|
||||
case RECEIVE_PARAMETER_VALUE:
|
||||
unpack_message(msg);
|
||||
SettingParam *param = setting_param_new_from_data(&msg->str[8], NULL);
|
||||
g_message("ID: %d Position: %d Value: %d", param->id, param->position, param->value);
|
||||
g_message("ID: %5d Position: %2d Value: %.1d", param->id, param->position, param->value);
|
||||
|
||||
GDK_THREADS_ENTER();
|
||||
apply_setting_param_to_gui(param);
|
||||
@@ -274,12 +274,59 @@ void push_message(GString *msg)
|
||||
} else {
|
||||
g_message("%d %d moved to %d %d", str[9], str[10], str[11], str[12]);
|
||||
}
|
||||
case NOTIFY_MODIFIER_GROUP_CHANGED:
|
||||
{
|
||||
int i;
|
||||
printf("\n");
|
||||
for (i = 0; i < msg->len; i++) {
|
||||
printf(" %02x", (unsigned char) str[i]);
|
||||
}
|
||||
printf("\n");
|
||||
g_message("Modifier group id %d changed",
|
||||
(str[9] << 8) | (str[10]));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
g_message("Received unhandled device notification 0x%x", str[11]);
|
||||
}
|
||||
g_string_free(msg, TRUE);
|
||||
return;
|
||||
case RECEIVE_GLOBAL_PARAMETERS:
|
||||
unpack_message(msg);
|
||||
gint tot, n, x;
|
||||
tot = (unsigned char)msg->str[9];
|
||||
for (n = 0; n < msg->len; n++) {
|
||||
printf("%02x ",(unsigned char) msg->str[n]);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
n = 0;
|
||||
x = 10;
|
||||
do {
|
||||
param = setting_param_new_from_data(&msg->str[x], &x);
|
||||
g_message("Received global param ID: %5d Position: %2.1d Value: %6.1d",
|
||||
param->id, param->position, param->value);
|
||||
setting_param_free(param);
|
||||
} while ( (x < msg->len) && n < tot);
|
||||
|
||||
g_string_free(msg, TRUE);
|
||||
return;
|
||||
|
||||
|
||||
case RECEIVE_MODIFIER_LINKABLE_LIST:
|
||||
unpack_message(msg);
|
||||
tot = (unsigned char)msg->str[9];
|
||||
for (n = 0; n < msg->len; n++) {
|
||||
printf("%02x ",(unsigned char) msg->str[n]);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
modifier_linkable_list(msg);
|
||||
|
||||
g_string_free(msg, TRUE);
|
||||
return;
|
||||
|
||||
|
||||
default:
|
||||
g_mutex_lock(message_queue_mutex);
|
||||
g_queue_push_tail(message_queue, msg);
|
||||
@@ -664,6 +711,7 @@ void set_option(guint id, guint position, guint value)
|
||||
((id & 0xFF00) >> 8), (id & 0xFF),
|
||||
position);
|
||||
append_value(msg, value);
|
||||
g_message("Sending id %d position %d value %d", id, position, value);
|
||||
send_message(RECEIVE_PARAMETER_VALUE, msg->str, msg->len);
|
||||
g_string_free(msg, TRUE);
|
||||
}
|
||||
@@ -1082,8 +1130,6 @@ static gboolean request_who_am_i(unsigned char *device_id, unsigned char *family
|
||||
*device_id = data->str[8];
|
||||
*family_id = data->str[9];
|
||||
*product_id = data->str[10];
|
||||
g_message("I am device id %d family %d product id %d.",
|
||||
*device_id, *family_id, *product_id);
|
||||
g_string_free(data, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user