Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

L- and R- button long press options added #24

Merged
merged 3 commits into from
May 20, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Settings.c
  • Loading branch information
nieldk authored May 20, 2020
commit c8718a976cc45e7bac969201aaeca781f06d92f5
12 changes: 7 additions & 5 deletions Firmware/Chameleon-Mini/Settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ SettingsType EEMEM StoredSettings = {
[0 ...(SETTINGS_COUNT - 1)] = {
.Configuration = DEFAULT_CONFIGURATION,
.ButtonActions = {
[BUTTON_L_PRESS_SHORT] = DEFAULT_LBUTTON_ACTION, [BUTTON_R_PRESS_SHORT] = DEFAULT_RBUTTON_ACTION,
[BUTTON_L_PRESS_LONG] = DEFAULT_LBUTTON_ACTION, [BUTTON_R_PRESS_LONG] = DEFAULT_RBUTTON_ACTION
[BUTTON_L_PRESS_SHORT] = DEFAULT_LBUTTON_ACTION, [BUTTON_L_PRESS_SHORT] = DEFAULT_LBUTTON_ACTION,
[BUTTON_L_PRESS_LONG] = DEFAULT_LBUTTON_ACTION_LONG, [BUTTON_L_PRESS_LONG] = DEFAULT_LBUTTON_ACTION_LONG,
[BUTTON_R_PRESS_SHORT] = DEFAULT_RBUTTON_ACTION, [BUTTON_R_PRESS_SHORT] = DEFAULT_RBUTTON_ACTION,
[BUTTON_R_PRESS_LONG] = DEFAULT_RBUTTON_ACTION_LONG, [BUTTON_R_PRESS_LONG] = DEFAULT_RBUTTON_ACTION_LONG
},
.LogMode = DEFAULT_LOG_MODE,
.LEDRedFunction = DEFAULT_RED_LED_ACTION,
Expand All @@ -44,7 +46,7 @@ SettingsType EEMEM StoredSettings = {
.Configuration = CONFIG_ISO14443A_READER,
.ButtonActions = {
[BUTTON_L_PRESS_SHORT] = DEFAULT_LBUTTON_ACTION, [BUTTON_R_PRESS_SHORT] = DEFAULT_RBUTTON_ACTION,
[BUTTON_L_PRESS_LONG] = DEFAULT_LBUTTON_ACTION, [BUTTON_R_PRESS_LONG] = DEFAULT_RBUTTON_ACTION
[BUTTON_L_PRESS_LONG] = DEFAULT_LBUTTON_ACTION_LONG, [BUTTON_R_PRESS_LONG] = DEFAULT_RBUTTON_ACTION_LONG
},
.LogMode = DEFAULT_LOG_MODE,
.LEDRedFunction = DEFAULT_RED_LED_ACTION,
Expand All @@ -67,8 +69,8 @@ void SettingsLoad(void) {
GlobalSettings.Settings[i].Configuration = CONFIG_NONE;
GlobalSettings.Settings[i].ButtonActions[BUTTON_L_PRESS_SHORT] = DEFAULT_LBUTTON_ACTION;
GlobalSettings.Settings[i].ButtonActions[BUTTON_R_PRESS_SHORT] = DEFAULT_RBUTTON_ACTION;
GlobalSettings.Settings[i].ButtonActions[BUTTON_L_PRESS_LONG] = DEFAULT_LBUTTON_ACTION;
GlobalSettings.Settings[i].ButtonActions[BUTTON_R_PRESS_LONG] = DEFAULT_RBUTTON_ACTION;
GlobalSettings.Settings[i].ButtonActions[BUTTON_L_PRESS_LONG] = DEFAULT_LBUTTON_ACTION_LONG;
GlobalSettings.Settings[i].ButtonActions[BUTTON_R_PRESS_LONG] = DEFAULT_RBUTTON_ACTION_LONG;
GlobalSettings.Settings[i].LogMode = DEFAULT_LOG_MODE;
GlobalSettings.Settings[i].LEDRedFunction = DEFAULT_RED_LED_ACTION;
GlobalSettings.Settings[i].LEDGreenFunction = DEFAULT_GREEN_LED_ACTION;
Expand Down