Receive Who Am I can vary in length between versions
This commit is contained in:
11
gdigi.c
11
gdigi.c
@@ -670,14 +670,11 @@ static gboolean request_who_am_i(unsigned char *device_id, unsigned char *family
|
|||||||
|
|
||||||
GString *data = get_message_by_id(RECEIVE_WHO_AM_I);
|
GString *data = get_message_by_id(RECEIVE_WHO_AM_I);
|
||||||
if (data != NULL) {
|
if (data != NULL) {
|
||||||
if (data->len == 14) {
|
*device_id = data->str[8];
|
||||||
*device_id = data->str[8];
|
*family_id = data->str[9];
|
||||||
*family_id = data->str[9];
|
*product_id = data->str[10];
|
||||||
*product_id = data->str[10];
|
|
||||||
g_string_free(data, TRUE);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
g_string_free(data, TRUE);
|
g_string_free(data, TRUE);
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user