Skip to content

Commit

Permalink
removed useless entry in the menu
Browse files Browse the repository at this point in the history
  • Loading branch information
StormOtx committed Mar 11, 2016
1 parent d4097c9 commit 9698868
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
12 changes: 4 additions & 8 deletions Margoulineur2000.ino
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void setup(void)

uint32_t versiondata = nfc.getFirmwareVersion();

if (! versiondata)
if (!versiondata)
{
Serial.print(F("Didn't find PN53x board"));
lcd.setCursor(0,1);
Expand Down Expand Up @@ -79,17 +79,13 @@ void loop(void)
nfc_read_write(4, true);
break;
case 4:
lcd.clear();
lcd.clear();
nfc_read_write(5, false);
break;
break;
case 5:
lcd.clear();
lcd.clear();
nfc_read_write(5, true);
break;
case 6:
lcd.clear();
nfc_read_write(13, true);
break;
}
}
}
Expand Down
9 changes: 4 additions & 5 deletions margoulinade.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
# include <Encoder.h>


# define OPTIMIZATION_MODE 0 // Sets the optimization, 1 to only go through the desirable blocks, 0 for all blocks
# define POURRISSAGE 1 // Sets the writing of silly messages in some blocks of the card
# define OPTIMIZATION_MODE 1 // Sets the optimization, 1 to only go through the desirable blocks, 0 for all blocks
# define POURRISSAGE 0 // Sets the writing of silly messages in some blocks of the card. It will not work with optimization on

# define MENUELEMENTS 8 // Number of elements in the menu
# define MENUELEMENTS 7 // Number of elements in the menu

# define ENCODERSTEPS 4 //Steps for the rotary encoder, menu selection
# define VALMIN 0 // Min value of the new balance in the write sequence
Expand Down Expand Up @@ -45,8 +45,7 @@ String menuStrings[][2] =
{{"4. write D4"},{"write new balance of the dormitory 4"}},
{{"5. read new D4"},{"read balance new D4 cards"}},
{{"6. write new D4"},{"write balance new D4 cards"}},
{{"7.Format Blank to D3"},{"Convert a blank cart to a dormitory 3 card"}},
{{"8. About"},{"by guigur & oborotev"}},
{{"7. About"},{"by guigur & oborotev"}},
};

typedef struct s_nfc_handler
Expand Down
5 changes: 2 additions & 3 deletions washmach_RW.ino
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ void sectorsParsing(t_nfc_handler *nfc_handler, bool mode, byte dormitory
if (dormitory == 3)
dormitory3Authentication(nfc_handler);
else if (dormitory == 4)
nfc_handler->success = nfc.mifareclassic_AuthenticateBlock (nfc_handler->uid, nfc_handler->uidLength, nfc_handler->currentblock, nfc_handler->keyNumber, nfc_handler->KeyA_D4);
nfc_handler->success = nfc.mifareclassic_AuthenticateBlock(nfc_handler->uid, nfc_handler->uidLength, nfc_handler->currentblock, nfc_handler->keyNumber, nfc_handler->KeyA_D4);
else if (dormitory == 5)
dormitory4newCardsAuthentication(nfc_handler);
else if (dormitory == 13)
nfc_handler->success = nfc.mifareclassic_AuthenticateBlock (nfc_handler->uid, nfc_handler->uidLength, nfc_handler->currentblock, nfc_handler->keyNumber, nfc_handler->KeyA_Blank);
nfc_handler->success = nfc.mifareclassic_AuthenticateBlock(nfc_handler->uid, nfc_handler->uidLength, nfc_handler->currentblock, nfc_handler->keyNumber, nfc_handler->KeyA_Blank);

Serial.println("");
if (nfc_handler->success)
Expand Down Expand Up @@ -251,7 +251,6 @@ void sectorsParsing(t_nfc_handler *nfc_handler, bool mode, byte dormitory
// Oops ... something happened
Serial.print(F("Block "));Serial.print(nfc_handler->currentblock, DEC);
Serial.println(F(" unable to read this block"));

}
}
}
Expand Down

0 comments on commit 9698868

Please sign in to comment.