Skip to content

Commit

Permalink
some opti, and added pourrissage availibility
Browse files Browse the repository at this point in the history
  • Loading branch information
StormOtx committed Mar 11, 2016
1 parent 4d6fbce commit d4097c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion margoulinade.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
# include <Encoder.h>


# define OPTIMIZATION_MODE 1 // Sets the optimization, 1 to only go through the desirable blocks, 0 for all blocks
# 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 MENUELEMENTS 8 // Number of elements in the menu

Expand Down
10 changes: 5 additions & 5 deletions washmach_RW.ino
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,18 @@ void sectorsParsing(t_nfc_handler *nfc_handler, bool mode, byte dormitory
nfc_handler->offset = nfc_handler->currentblock == 25 ? 6 : 7;
else
nfc_handler->offset = nfc_handler->currentblock == 25 ? 8 : 7;
if (dormitory == 13)
{
nfc_handler->success = nfc.mifareclassic_WriteDataBlock(nfc_handler->currentblock, nfc_handler->data);
}
nfc.mifareclassic_ReadDataBlock(nfc_handler->currentblock, nfc_handler->data);
nfc_handler->data[nfc_handler->offset - 1] = nfc_handler->balance[0];
nfc_handler->data[nfc_handler->offset] = nfc_handler->balance[1];
nfc_handler->success = nfc.mifareclassic_WriteDataBlock(nfc_handler->currentblock, nfc_handler->data);
newBalanceWrite(nfc_handler);
}
else if (nfc_handler->currentblock == 24 || nfc_handler->currentblock == 26 && dormitory == 4)
oldDormitory4WriteBalance(nfc_handler);
else if (nfc_handler->currentblock == 60 && POURRISSAGE)
{
memcpy(nfc_handler->data, "You got rekt son", 16);
nfc_handler->success = nfc.mifareclassic_WriteDataBlock(nfc_handler->currentblock, nfc_handler->data);
}
}
}
else
Expand Down

0 comments on commit d4097c9

Please sign in to comment.