Compare commits
3 Commits
1.99.2
...
a4afc4ced7
Author | SHA1 | Date | |
---|---|---|---|
a4afc4ced7 | |||
06d43009ad
|
|||
bed98c2c0e
|
84
include/dynamic-machine-conditions.h
Normal file
84
include/dynamic-machine-conditions.h
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
#ifndef DYNAMIC_MACHINE_CONDITIONS_H_INCLUDED
|
||||||
|
#define DYNAMIC_MACHINE_CONDITIONS_H_INCLUDED
|
||||||
|
|
||||||
|
struct T_dynamicCondition
|
||||||
|
{
|
||||||
|
char allDoorsDebounced;
|
||||||
|
char openedAuthorized;
|
||||||
|
uint8_t CBinDebounced; // 0:fehlt 1:drin
|
||||||
|
char upperDoor; // 99: undefined 0:closed 1:open
|
||||||
|
char middleDoor; // 99: undefined 0:closed 1:open
|
||||||
|
char lowerDoor; // 99: undefined 0:closed 1:open
|
||||||
|
char coinAttached;
|
||||||
|
char billBox;
|
||||||
|
char modeAbrech;
|
||||||
|
char onAlarm; // 0:alarm aus 1:alarm 2:alarm mit Sirene 3: Sirenentest
|
||||||
|
char nowCardTest;
|
||||||
|
char nowPayment; // not used, always 0
|
||||||
|
char lastMifCardType;
|
||||||
|
uint8_t lastSDoorState;
|
||||||
|
uint8_t lastVDoorState;
|
||||||
|
uint8_t lastCBstate;
|
||||||
|
char paymentInProgress;
|
||||||
|
// Version Szeged: aug2023
|
||||||
|
// 0: stopped by timeout
|
||||||
|
// 1: running 2: wait4lastCoin
|
||||||
|
// 3: payment stopped manually, coins in Escrow
|
||||||
|
// 4: payment stopped autom, amount collected, coins in Escrow
|
||||||
|
// 5: payment stopped, escrow full, coins in Escrow
|
||||||
|
// 6: coins encashed 7:coins returned
|
||||||
|
// 8: CoinChecker or MDB on Error
|
||||||
|
|
||||||
|
// since Schoenau with bill and changer, nov2023
|
||||||
|
//0 = no payment
|
||||||
|
//will be set to 1 by cash_startCollection()
|
||||||
|
//neu 1: wait for devices getting ready for payment
|
||||||
|
//2 = payment,
|
||||||
|
//3 = wait for last coin/bill
|
||||||
|
//4 = Bezahlvorgang manuell beendet
|
||||||
|
//5 = payment stopped autom, amount collected, coins in Escrow
|
||||||
|
//6 = Bezahlvorgang beendet weil ZK voll
|
||||||
|
//4,5,6: payment done, keep on polling, wait for cash or return command
|
||||||
|
//7 = encash collected money from coin escrow into cash box
|
||||||
|
//8 = return "amountToReturn", can be complete inserted amount or only overpayment
|
||||||
|
//9 = wait for changer result
|
||||||
|
//10= print refund receipt with "amountToReturn"
|
||||||
|
|
||||||
|
char res1;
|
||||||
|
uint16_t U_Batt;
|
||||||
|
uint16_t Temperatur;
|
||||||
|
uint16_t nrCoinsInBox;
|
||||||
|
uint32_t amountInBox;
|
||||||
|
uint32_t totalTransVolume;
|
||||||
|
uint32_t totalNrOfVends;
|
||||||
|
char jsonValid_config;
|
||||||
|
char jsonValid_device;
|
||||||
|
char jsonValid_cash;
|
||||||
|
char jsonValid_print;
|
||||||
|
// 40
|
||||||
|
char jsonValid_serial;
|
||||||
|
char jsonValid_time;
|
||||||
|
char lastFileType;
|
||||||
|
uint8_t MifCardHolder[8];
|
||||||
|
uint8_t resultOfLastTemplPrint;
|
||||||
|
// 0: unknown or printing in progress
|
||||||
|
// 1: OK, doc was printed 2: error, doc was not printed
|
||||||
|
uint8_t lastPrinterStatus;
|
||||||
|
// 0: printer OK
|
||||||
|
// bit0: near paper end bit1: no paper
|
||||||
|
// bit2: temperature error bit3: error head open
|
||||||
|
// bit4: paper jam in cutter
|
||||||
|
// bit6: no response bit7: serial rec. error
|
||||||
|
// bit5: printer not ready
|
||||||
|
uint8_t startupTestIsRunning;
|
||||||
|
|
||||||
|
uint8_t padd01;
|
||||||
|
uint8_t padd02;
|
||||||
|
uint8_t padd03;
|
||||||
|
uint32_t padd04;
|
||||||
|
uint32_t padd05;
|
||||||
|
uint32_t padd06;
|
||||||
|
uint16_t padd07;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DYNAMIC_MACHINE_CONDITIONS_H_INCLUDED
|
@@ -990,8 +990,8 @@ char T_datif::loadRecDataFromFrame()
|
|||||||
case 112: // get inserted amount in cent in sum
|
case 112: // get inserted amount in cent in sum
|
||||||
// byte 0..3: amount just paid 4,5:last coin type 6,7: last coin value
|
// byte 0..3: amount just paid 4,5:last coin type 6,7: last coin value
|
||||||
newInsertedAmount=uchar2ulong(receivedData[3],receivedData[2],receivedData[1],receivedData[0]);
|
newInsertedAmount=uchar2ulong(receivedData[3],receivedData[2],receivedData[1],receivedData[0]);
|
||||||
uitmp=uchar2uint(receivedData[5],receivedData[4]);
|
uitmp=uchar2uint(receivedData[5],receivedData[4]); // last coin type
|
||||||
uit2=uchar2uint(receivedData[7],receivedData[6]);
|
uit2=uchar2uint(receivedData[7],receivedData[6]); // last coin value
|
||||||
//if (uitmp>0) // nur 1x bei neuer Münze 6.10.23 aendern:
|
//if (uitmp>0) // nur 1x bei neuer Münze 6.10.23 aendern:
|
||||||
// beim Wechsler hat die kleinste Muenze immer coin type 0!
|
// beim Wechsler hat die kleinste Muenze immer coin type 0!
|
||||||
if (uitmp>10000 || uit2>10000)
|
if (uitmp>10000 || uit2>10000)
|
||||||
@@ -999,7 +999,7 @@ char T_datif::loadRecDataFromFrame()
|
|||||||
uitmp=0;
|
uitmp=0;
|
||||||
uit2=0;
|
uit2=0;
|
||||||
}
|
}
|
||||||
if (newInsertedAmount != lastInsertedAmount)
|
if ((newInsertedAmount != lastInsertedAmount) || uit2>0) // 22.5.2024
|
||||||
{
|
{
|
||||||
gpi_storeCurrentPayment(newInsertedAmount, uitmp, uit2);
|
gpi_storeCurrentPayment(newInsertedAmount, uitmp, uit2);
|
||||||
emit datif_gotNewCoin(); // OR BILL if (uitmp & 0x8000)>0
|
emit datif_gotNewCoin(); // OR BILL if (uitmp & 0x8000)>0
|
||||||
|
Reference in New Issue
Block a user