forked from GerhardHoffmann/DCLibraries
		
	// minor add comment for function bna_getCurrentNotes
This commit is contained in:
		@@ -24,7 +24,8 @@ struct T_emp
 | 
			
		||||
 | 
			
		||||
   // dynamic:
 | 
			
		||||
   uint8_t state;      // step counter of EMP (electronic coin checker) FSM (finite state machine):
 | 
			
		||||
       // 0=start command
 | 
			
		||||
   /*
 | 
			
		||||
   // 0=start command
 | 
			
		||||
       // 1=powered, do emp ini, send reset
 | 
			
		||||
       // 2=delay
 | 
			
		||||
       // 3=wait for response, requesting status after response
 | 
			
		||||
@@ -39,7 +40,7 @@ struct T_emp
 | 
			
		||||
       // 90: stop all, 1s delay
 | 
			
		||||
       // 99: off, all stopped
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
   uint8_t pollingRunning;
 | 
			
		||||
   uint8_t paymentRunning;
 | 
			
		||||
 | 
			
		||||
@@ -238,6 +239,7 @@ struct T_dynamicCondition
 | 
			
		||||
        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
 | 
			
		||||
@@ -246,6 +248,21 @@ struct T_dynamicCondition
 | 
			
		||||
        //			    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;
 | 
			
		||||
@@ -2252,14 +2269,23 @@ public:
 | 
			
		||||
    virtual void bna_requestCurrentNotes() const {}
 | 
			
		||||
    // send command to DC in order to get transaction data
 | 
			
		||||
 | 
			
		||||
    virtual uint8_t bna_getCurrentNotes(uint16_t latestBill, uint16_t *currentNotes) const {
 | 
			
		||||
    virtual uint8_t bna_getCurrentNotes(uint16_t latestBill, uint16_t *currentNotes) const
 | 
			
		||||
    {
 | 
			
		||||
        Q_UNUSED(latestBill);
 | 
			
		||||
        Q_UNUSED(currentNotes);
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
    // returns number of collected bank notes since start-command (current transaction)
 | 
			
		||||
    //  latestBill: last accepted bank note, value in cent
 | 
			
		||||
    //  currentNotes an array with up to 16 (further) notes collected
 | 
			
		||||
    // return value: numbers of bills or 99 in case of error
 | 
			
		||||
    //  latestBill: not used
 | 
			
		||||
    // in case of error: currentNotes[0,1,2,3] = 1..4 error number(s)
 | 
			
		||||
    // in normal case:
 | 
			
		||||
    //  currentNotes[0]: last bill in cent (e.g. 1000 = 10€)
 | 
			
		||||
    //  currentNotes[1]: bin 1 = bill is still in escrow   else bill is stacked
 | 
			
		||||
    //       note: by now (dec2023) escrow is not used, bills always go to stacker (box)
 | 
			
		||||
    //  currentNotes[2]: total sum of bills in cent, low word (16bit)
 | 
			
		||||
    //  currentNotes[3]: total sum of bills in cent, high word (16bit)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    virtual void bna_requestStackerLevel() const {}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user