Skip to content

Commit

Permalink
Merge pull request #155 from shinhub/fix_buttonlong_init
Browse files Browse the repository at this point in the history
Fix buttonlong init
  • Loading branch information
iceman1001 authored Sep 18, 2019
2 parents 19af655 + 14834ab commit 697be03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Firmware/ChameleonMini/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ SETTINGS += -DDEFAULT_CONFIGURATION=CONFIG_NONE
#SETTINGS += -DDEFAULT_CONFIGURATION=CONFIG_ISO14443A_READER

#Default button actions
SETTINGS += -DDEFAULT_BUTTON_ACTION=BUTTON_ACTION_NONE
#SETTINGS += -DDEFAULT_BUTTON_ACTION=BUTTON_ACTION_NONE
#SETTINGS += -DDEFAULT_BUTTON_ACTION=BUTTON_ACTION_UID_RANDOM
#SETTINGS += -DDEFAULT_BUTTON_ACTION=BUTTON_ACTION_UID_LEFT_INCREMENT
#SETTINGS += -DDEFAULT_BUTTON_ACTION=BUTTON_ACTION_UID_RIGHT_INCREMENT
#SETTINGS += -DDEFAULT_BUTTON_ACTION=BUTTON_ACTION_UID_LEFT_DECREMENT
#SETTINGS += -DDEFAULT_BUTTON_ACTION=BUTTON_ACTION_UID_RIGHT_DECREMENT
#SETTINGS += -DDEFAULT_BUTTON_ACTION=BUTTON_ACTION_CYCLE_SETTINGS
SETTINGS += -DDEFAULT_BUTTON_ACTION=BUTTON_ACTION_CYCLE_SETTINGS
#SETTINGS += -DDEFAULT_BUTTON_ACTION=BUTTON_ACTION_STORE_MEM

#Default long button action
SETTINGS += -DDEFAULT_BUTTON_LONG_ACTION=BUTTON_ACTION_CYCLE_SETTINGS
SETTINGS += -DDEFAULT_BUTTON_LONG_ACTION=BUTTON_ACTION_NONE

#Define if button action setting should be independent of active setting
#SETTINGS += -DBUTTON_SETTING_GLOBAL
Expand Down
4 changes: 2 additions & 2 deletions Firmware/ChameleonMini/Terminal/Commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ CommandStatusIdType CommandExecClear(char* OutParam) {
AppMemoryClear();
ConfigurationSetById(DEFAULT_CONFIGURATION);
ButtonSetActionById(BUTTON_PRESS_SHORT, DEFAULT_BUTTON_ACTION);
ButtonSetActionById(BUTTON_PRESS_LONG, DEFAULT_BUTTON_ACTION);
ButtonSetActionById(BUTTON_PRESS_LONG, DEFAULT_BUTTON_LONG_ACTION);
SettingsSave();
return COMMAND_INFO_OK_ID;
}
Expand Down Expand Up @@ -414,7 +414,7 @@ CommandStatusIdType CommandExecClearAll(char* OutMessage)
SettingsSetActiveById(i);
ConfigurationSetById(DEFAULT_CONFIGURATION);
ButtonSetActionById(BUTTON_PRESS_SHORT, DEFAULT_BUTTON_ACTION);
ButtonSetActionById(BUTTON_PRESS_LONG, DEFAULT_BUTTON_ACTION);
ButtonSetActionById(BUTTON_PRESS_LONG, DEFAULT_BUTTON_LONG_ACTION);
}
SettingsSetActiveById(SETTINGS_FIRST);
SettingsSave();
Expand Down

0 comments on commit 697be03

Please sign in to comment.