@@ -28,7 +28,13 @@ static const ContinuityColor colors_powerbeats_3[] = {
28
28
};
29
29
static const ContinuityColor colors_powerbeats_pro [] = {
30
30
{0x00 , "White" },
31
- {0x01 , "Black" },
31
+ {0x02 , "Yellowish Green" },
32
+ {0x03 , "Blue" },
33
+ {0x04 , "Black" },
34
+ {0x05 , "Pink" },
35
+ {0x06 , "Red" },
36
+ {0x0B , "Gray ?" },
37
+ {0x0D , "Sky Blue" },
32
38
};
33
39
static const ContinuityColor colors_beats_solo_pro [] = {
34
40
{0x00 , "White" },
@@ -45,8 +51,16 @@ static const ContinuityColor colors_beats_x[] = {
45
51
static const ContinuityColor colors_beats_studio_3 [] = {
46
52
{0x00 , "White" },
47
53
{0x01 , "Black" },
48
- {0x03 , "Red" },
49
- {0x43 , "White marble" },
54
+ {0x02 , "Red" },
55
+ {0x03 , "Blue" },
56
+ {0x18 , "Shadow Gray" },
57
+ {0x19 , "Desert Sand" },
58
+ {0x25 , "Black / Red" },
59
+ {0x26 , "Midnight Black" },
60
+ {0x27 , "Desert Sand 2" },
61
+ {0x28 , "Clear blue/ gold" },
62
+ {0x42 , "Green Forest camo" },
63
+ {0x43 , "White Camo" },
50
64
};
51
65
static const ContinuityColor colors_beats_studio_pro [] = {
52
66
{0x00 , "White" },
@@ -438,20 +452,47 @@ static void pp_model_changed(VariableItem* item) {
438
452
Payload * payload = & ctx -> attack -> payload ;
439
453
ContinuityCfg * cfg = & payload -> cfg .continuity ;
440
454
uint8_t index = variable_item_get_current_value_index (item );
455
+ const char * color_name = NULL ;
456
+ char color_name_buf [3 ];
457
+ uint8_t colors_count ;
458
+ uint8_t value_index_color ;
441
459
if (index ) {
442
460
index -- ;
443
461
if (payload -> mode != PayloadModeBruteforce ||
444
462
cfg -> data .proximity_pair .bruteforce_mode == ContinuityPpBruteforceModel )
445
463
payload -> mode = PayloadModeValue ;
446
464
cfg -> data .proximity_pair .model = pp_models [index ].value ;
447
465
variable_item_set_current_value_text (item , pp_models [index ].name );
466
+ colors_count = pp_models [index ].colors_count ;
467
+ if (payload -> mode == PayloadModeValue ) {
468
+ for (uint8_t j = 0 ; j < colors_count ; j ++ ) {
469
+ if (cfg -> data .proximity_pair .color == pp_models [index ].colors [j ].value ) {
470
+ color_name = pp_models [index ].colors [j ].name ;
471
+ value_index_color = j ;
472
+ break ;
473
+ }
474
+ }
475
+ if (!color_name ) {
476
+ snprintf (
477
+ color_name_buf , sizeof (color_name_buf ), "%02X" , cfg -> data .proximity_pair .color );
478
+ color_name = color_name_buf ;
479
+ value_index_color = colors_count ;
480
+ }
481
+ } else {
482
+ color_name = "Bruteforce" ;
483
+ value_index_color = colors_count ;
484
+ }
448
485
} else {
449
486
payload -> mode = PayloadModeRandom ;
450
487
variable_item_set_current_value_text (item , "Random" );
488
+ color_name = "Random" ;
489
+ colors_count = 1 ;
490
+ value_index_color = 0 ;
451
491
}
452
- scene_manager_set_scene_state (ctx -> scene_manager , SceneConfig , ConfigPpModel );
453
- scene_manager_previous_scene (ctx -> scene_manager );
454
- scene_manager_next_scene (ctx -> scene_manager , SceneConfig );
492
+ item = variable_item_list_get (ctx -> variable_item_list , ConfigPpColor );
493
+ variable_item_set_values_count (item , colors_count );
494
+ variable_item_set_current_value_index (item , value_index_color );
495
+ variable_item_set_current_value_text (item , color_name );
455
496
}
456
497
static void pp_color_changed (VariableItem * item ) {
457
498
Payload * payload = variable_item_get_context (item );
0 commit comments