@@ -271,7 +271,7 @@ static FeatureResult handle_feature(struct device* device_found, hid_device** de
271
271
272
272
switch (cap ) {
273
273
case CAP_SIDETONE :
274
- ret = device_found -> send_sidetone (* device_handle , (uint8_t )* (int * )param );
274
+ ret = device_found -> send_sidetone (* device_handle , (uint8_t ) * (int * )param );
275
275
break ;
276
276
277
277
case CAP_BATTERY_STATUS : {
@@ -307,15 +307,15 @@ static FeatureResult handle_feature(struct device* device_found, hid_device** de
307
307
}
308
308
309
309
case CAP_NOTIFICATION_SOUND :
310
- ret = device_found -> notifcation_sound (* device_handle , (uint8_t )* (int * )param );
310
+ ret = device_found -> notifcation_sound (* device_handle , (uint8_t ) * (int * )param );
311
311
break ;
312
312
313
313
case CAP_LIGHTS :
314
- ret = device_found -> switch_lights (* device_handle , (uint8_t )* (int * )param );
314
+ ret = device_found -> switch_lights (* device_handle , (uint8_t ) * (int * )param );
315
315
break ;
316
316
317
317
case CAP_INACTIVE_TIME :
318
- ret = device_found -> send_inactive_time (* device_handle , (uint8_t )* (int * )param );
318
+ ret = device_found -> send_inactive_time (* device_handle , (uint8_t ) * (int * )param );
319
319
break ;
320
320
321
321
case CAP_CHATMIX_STATUS :
@@ -334,39 +334,39 @@ static FeatureResult handle_feature(struct device* device_found, hid_device** de
334
334
return result ;
335
335
336
336
case CAP_VOICE_PROMPTS :
337
- ret = device_found -> switch_voice_prompts (* device_handle , (uint8_t )* (int * )param );
337
+ ret = device_found -> switch_voice_prompts (* device_handle , (uint8_t ) * (int * )param );
338
338
break ;
339
339
340
340
case CAP_ROTATE_TO_MUTE :
341
- ret = device_found -> switch_rotate_to_mute (* device_handle , (uint8_t )* (int * )param );
341
+ ret = device_found -> switch_rotate_to_mute (* device_handle , (uint8_t ) * (int * )param );
342
342
break ;
343
343
344
344
case CAP_EQUALIZER_PRESET :
345
- ret = device_found -> send_equalizer_preset (* device_handle , (uint8_t )* (int * )param );
345
+ ret = device_found -> send_equalizer_preset (* device_handle , (uint8_t ) * (int * )param );
346
346
break ;
347
347
348
348
case CAP_EQUALIZER :
349
349
ret = device_found -> send_equalizer (* device_handle , (struct equalizer_settings * )param );
350
350
break ;
351
351
352
352
case CAP_MICROPHONE_MUTE_LED_BRIGHTNESS :
353
- ret = device_found -> send_microphone_mute_led_brightness (* device_handle , (uint8_t )* (int * )param );
353
+ ret = device_found -> send_microphone_mute_led_brightness (* device_handle , (uint8_t ) * (int * )param );
354
354
break ;
355
355
356
356
case CAP_MICROPHONE_VOLUME :
357
- ret = device_found -> send_microphone_volume (* device_handle , (uint8_t )* (int * )param );
357
+ ret = device_found -> send_microphone_volume (* device_handle , (uint8_t ) * (int * )param );
358
358
break ;
359
359
360
360
case CAP_VOLUME_LIMITER :
361
- ret = device_found -> send_volume_limiter (* device_handle , (uint8_t )* (int * )param );
361
+ ret = device_found -> send_volume_limiter (* device_handle , (uint8_t ) * (int * )param );
362
362
break ;
363
363
364
364
case CAP_BT_WHEN_POWERED_ON :
365
- ret = device_found -> send_bluetooth_when_powered_on (* device_handle , (uint8_t )* (int * )param );
365
+ ret = device_found -> send_bluetooth_when_powered_on (* device_handle , (uint8_t ) * (int * )param );
366
366
break ;
367
367
368
368
case CAP_BT_CALL_VOLUME :
369
- ret = device_found -> send_bluetooth_call_volume (* device_handle , (uint8_t )* (int * )param );
369
+ ret = device_found -> send_bluetooth_call_volume (* device_handle , (uint8_t ) * (int * )param );
370
370
break ;
371
371
372
372
case NUM_CAPABILITIES :
@@ -579,7 +579,7 @@ int main(int argc, char* argv[])
579
579
{
580
580
int c ;
581
581
582
- int selected_vendor_id = 0 ;
582
+ int selected_vendor_id = 0 ;
583
583
int selected_product_id = 0 ;
584
584
585
585
int should_print_help = 0 ;
@@ -962,19 +962,19 @@ int main(int argc, char* argv[])
962
962
963
963
FeatureRequest * feature_requests [headset_available ];
964
964
for (int i = 0 ; i < headset_available ; i ++ ) {
965
- feature_requests [i ] = memcpy (malloc (sizeof (featureRequests )), featureRequests , sizeof (featureRequests ));
965
+ feature_requests [i ] = memcpy (malloc (sizeof (featureRequests )), featureRequests , sizeof (featureRequests ));
966
966
devices_found [i ].featureRequests = feature_requests [i ];
967
- devices_found [i ].size = numFeatures ;
967
+ devices_found [i ].size = numFeatures ;
968
968
}
969
969
970
970
// For specific output types, like YAML, we will do all actions - even when not specified - to aggreate all information
971
971
if (output_format == OUTPUT_YAML || output_format == OUTPUT_JSON || output_format == OUTPUT_ENV ) {
972
- for (int i = 0 ; i < headset_available ; i ++ ) {
973
- for (int j = 0 ; j < numFeatures ; j ++ ){
972
+ for (int i = 0 ; i < headset_available ; i ++ ) {
973
+ for (int j = 0 ; j < numFeatures ; j ++ ) {
974
974
if (feature_requests [i ][j ].type == CAPABILITYTYPE_INFO && !feature_requests [i ][j ].should_process ) {
975
975
if ((devices_found [i ].device -> capabilities & B (feature_requests [i ][j ].cap )) == B (feature_requests [i ][j ].cap )) {
976
976
feature_requests [i ][j ].should_process = true;
977
- feature_requests [i ][j ].result = handle_feature (devices_found [i ].device , & device_handle , & hid_path , feature_requests [i ][j ].cap , feature_requests [i ][j ].param );
977
+ feature_requests [i ][j ].result = handle_feature (devices_found [i ].device , & device_handle , & hid_path , feature_requests [i ][j ].cap , feature_requests [i ][j ].param );
978
978
}
979
979
}
980
980
}
@@ -983,12 +983,12 @@ int main(int argc, char* argv[])
983
983
}
984
984
985
985
if (request_connected ) {
986
- if (device_selected == NULL ) {
986
+ if (device_selected == NULL ) {
987
987
fprintf (stderr , "Error: No device has been selected.\n" );
988
988
return 1 ;
989
989
}
990
990
struct device * device = device_selected -> device ;
991
- int is_test_device = test_device && device -> idVendor == VENDOR_TESTDEVICE && device -> idProduct == PRODUCT_TESTDEVICE ;
991
+ int is_test_device = test_device && device -> idVendor == VENDOR_TESTDEVICE && device -> idProduct == PRODUCT_TESTDEVICE ;
992
992
// Check if battery status can be read
993
993
// If it isn't supported, the device is
994
994
// probably wired meaning it is connected
@@ -1018,7 +1018,7 @@ int main(int argc, char* argv[])
1018
1018
} else {
1019
1019
printf ("true\n" );
1020
1020
}
1021
- } else {
1021
+ } else {
1022
1022
do {
1023
1023
if (device_selected != NULL ) {
1024
1024
FeatureRequest * deviceFeatureRequests = device_selected -> featureRequests ;
@@ -1049,7 +1049,7 @@ int main(int argc, char* argv[])
1049
1049
free (equalizer );
1050
1050
1051
1051
for (int i = 0 ; i < headset_available ; i ++ ) {
1052
- if (output_format != OUTPUT_STANDARD ){
1052
+ if (output_format != OUTPUT_STANDARD ) {
1053
1053
// Free memory from features
1054
1054
for (int j = 0 ; j < numFeatures ; j ++ ) {
1055
1055
free (devices_found [i ].featureRequests [j ].result .message );
0 commit comments