Remove unused code, fix bug
This commit is contained in:
parent
e04cb28711
commit
36e54642d2
@ -123,7 +123,7 @@ void main(void)
|
||||
}
|
||||
|
||||
u32 pinMode = MULTICONFIG(PIN);
|
||||
bool pinExists = pinMode != 0 && verifyPin(pinMode, true);
|
||||
bool pinExists = pinMode != 0 && verifyPin(pinMode);
|
||||
|
||||
//If no configuration file exists or SELECT is held, load configuration menu
|
||||
bool shouldLoadConfigMenu = needConfig == CREATE_CONFIGURATION || ((pressed & (BUTTON_SELECT | BUTTON_L1)) == BUTTON_SELECT);
|
||||
|
@ -122,7 +122,7 @@ void newPin(bool allowSkipping, u32 pinMode)
|
||||
error("Error writing the PIN file");
|
||||
}
|
||||
|
||||
bool verifyPin(u32 pinMode, bool hidePin)
|
||||
bool verifyPin(u32 pinMode)
|
||||
{
|
||||
PinData pin;
|
||||
|
||||
@ -172,7 +172,7 @@ bool verifyPin(u32 pinMode, bool hidePin)
|
||||
if(reset)
|
||||
{
|
||||
for(u32 i = 0; i < cnt; i++)
|
||||
drawCharacter((char)enteredPassword[i], true, 10 + (16 + 2 * i) * SPACING_X, 10 + 3 * SPACING_Y, COLOR_BLACK);
|
||||
drawCharacter('*', true, 10 + (16 + 2 * i) * SPACING_X, 10 + 3 * SPACING_Y, COLOR_BLACK);
|
||||
|
||||
cnt = 0;
|
||||
reset = false;
|
||||
@ -199,9 +199,9 @@ bool verifyPin(u32 pinMode, bool hidePin)
|
||||
|
||||
//Add character to password
|
||||
enteredPassword[cnt] = (u8)pinKeyToLetter(pressed);
|
||||
|
||||
//Visualize character on screen
|
||||
char display = hidePin ? '*' : (char)enteredPassword[cnt];
|
||||
drawCharacter(display, true, 10 + (16 + 2 * cnt) * SPACING_X, 10 + 3 * SPACING_Y, COLOR_WHITE);
|
||||
drawCharacter('*', true, 10 + (16 + 2 * cnt) * SPACING_X, 10 + 3 * SPACING_Y, COLOR_WHITE);
|
||||
|
||||
if(++cnt < lengthBlock[0]) continue;
|
||||
|
||||
|
@ -33,4 +33,4 @@
|
||||
#define PIN_VERSIONMINOR 3
|
||||
|
||||
void newPin(bool allowSkipping, u32 pinMode);
|
||||
bool verifyPin(u32 pinMode, bool hidePin);
|
||||
bool verifyPin(u32 pinMode);
|
Reference in New Issue
Block a user