47 lines
1.1 KiB
C
47 lines
1.1 KiB
C
#define NUM_OF_PEOPLE 25
|
|
#define NUM_OF_DRINKS 10
|
|
#define DRINK_NAME_MAX_LENGTH 13
|
|
#define FILE_NAME_LEN 8
|
|
#define FILE_EXTENSION_LEN 3
|
|
#define FILE_EXTENSION ".per"
|
|
#define NAME_LEN 10
|
|
|
|
#define led 4
|
|
|
|
//######### RFID CONSTANTS ##########
|
|
const int startZeichen = 02; // Chip-Kennung beginnt mit 02
|
|
const int endeZeichen = 03; // ASCII CR bendet Code
|
|
const int kennungLaenge = 12; // Laenge Chip-Code 10 ASCII-Zeichen
|
|
const int gesamtKennungLaenge = 14; // Code-Laenge + Start- und Ende-Byte
|
|
char code[kennungLaenge + 1]; // fuer den Code und abschliessende Null
|
|
int bytesGelesen = 0;
|
|
int zaehlerFehlerCode = 0;
|
|
String zugang = "000000000000"; // zugangscode zwischenspeicher, Standard
|
|
//#######################
|
|
|
|
|
|
|
|
typedef struct{
|
|
/*Drink spevifier*/
|
|
char name[DRINK_NAME_MAX_LENGTH + 1];
|
|
/*Value in cents*/
|
|
int price;
|
|
}Drink;
|
|
|
|
typedef struct{
|
|
Drink drinks[NUM_OF_DRINKS];
|
|
int waiting;
|
|
}Beerbox;
|
|
|
|
//this shall always just exist in a short term!
|
|
typedef struct{
|
|
char file_name[FILE_NAME_LEN + 1];
|
|
int drinks_taken[NUM_OF_DRINKS];
|
|
char name[NAME_LEN + 1];
|
|
char rfid_uuid[13];
|
|
uint8_t finger_uuid;
|
|
uint8_t credits_left;
|
|
}Person;
|
|
|
|
|