File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 9
9
#ifdef OLED_SCREEN
10
10
// Though OLED doesn't necessarily imply rechargeable battery, it's usually the case.
11
11
#define DEFAULT_BAT_MODE 1
12
- #else // !OLED_SCREEN
12
+ #else // !OLED_SCREEN
13
13
#define DEFAULT_BAT_MODE 0
14
- #endif // OLED_SCREEN
14
+ #endif // OLED_SCREEN
15
15
16
16
const settings_data_t def_settings_data = {.backlight = 0 ,
17
17
.oled_contrast = 40 ,
@@ -26,7 +26,8 @@ const settings_data_t def_settings_data = {.backlight = 0,
26
26
.show_mem_usage = false,
27
27
.anim_enabled = false,
28
28
.amiidb_data_slot_num = 20 ,
29
- .qrcode_enabled = true};
29
+ .qrcode_enabled = true,
30
+ .chameleon_freq_slot_index = INVALID_SLOT_INDEX };
30
31
31
32
settings_data_t m_settings_data = {0 };
32
33
@@ -63,6 +64,7 @@ static void validate_settings() {
63
64
BOOL_VALIDATE (m_settings_data .qrcode_enabled , 0 );
64
65
INT8_VALIDATE (m_settings_data .language , 0 , LANGUAGE_COUNT - 1 , LANGUAGE_EN_US );
65
66
INT8_VALIDATE (m_settings_data .amiidb_data_slot_num , 1 , 100 , 20 );
67
+ INT8_VALIDATE (m_settings_data .chameleon_freq_slot_index , 0 , 8 , INVALID_SLOT_INDEX );
66
68
}
67
69
68
70
int32_t settings_init () {
Original file line number Diff line number Diff line change 7
7
#include "app_amiibolink.h"
8
8
#include "i18n/language.h"
9
9
10
+ #define INVALID_SLOT_INDEX 0xFF
11
+
10
12
typedef struct {
11
- bool backlight ; //deprecated, keep for capability issue
13
+ bool backlight ; // deprecated, keep for capability issue
12
14
uint8_t sleep_timeout_sec ;
13
15
bool dirty ;
14
16
bool auto_gen_amiibo ;
15
- bool auto_gen_amiibolink ; //deprecated, keep for capability issue
17
+ bool auto_gen_amiibolink ; // deprecated, keep for capability issue
16
18
bool skip_driver_select ;
17
19
bool bat_mode ;
18
20
ble_amiibolink_ver_t amiibo_link_ver ;
@@ -24,6 +26,7 @@ typedef struct {
24
26
bool qrcode_enabled ;
25
27
Language language ;
26
28
uint8_t amiidb_data_slot_num ;
29
+ uint8_t chameleon_freq_slot_index ;
27
30
} settings_data_t ;
28
31
29
32
int32_t settings_init ();
You can’t perform that action at this time.
0 commit comments