Compare commits
24 Commits
27c0aa56ee
...
bugfix_mas
Author | SHA1 | Date | |
---|---|---|---|
8ee6fa24d9
|
|||
786c4332ee
|
|||
2c67638c34 | |||
e7538ae5df | |||
cb403b5dbb | |||
f226179e24 | |||
3eff32b45c | |||
075a9d9316 | |||
8c261af1a7 | |||
e0346e0a9b | |||
16b6ea8087 | |||
9bdc08f6fc | |||
a3bc3d53cd | |||
9971b7ac2e | |||
15ada1ad26 | |||
1811842082 | |||
13ff32b108 | |||
cea817cbcb | |||
e50871cf9f | |||
f6f90fe770 | |||
7b1ea963e2 | |||
8163be5022 | |||
1fdbf3b9ca | |||
d380bcafe8 |
@@ -375,6 +375,9 @@ bool T_winComPort::working(uint16_t *nextScreen, uint8_t *useNavi)
|
|||||||
// bit0,1: enable/disable button "next"
|
// bit0,1: enable/disable button "next"
|
||||||
// bit2,3: enable/disable button "home"
|
// bit2,3: enable/disable button "home"
|
||||||
// bit4,5: enable/disable button "back"
|
// bit4,5: enable/disable button "back"
|
||||||
|
QString bs, cn;
|
||||||
|
int br, ci;
|
||||||
|
|
||||||
|
|
||||||
this->updateGui();
|
this->updateGui();
|
||||||
*nextScreen=0; // 0=no change
|
*nextScreen=0; // 0=no change
|
||||||
@@ -385,22 +388,29 @@ bool T_winComPort::working(uint16_t *nextScreen, uint8_t *useNavi)
|
|||||||
// load and use last settings: --------------------
|
// load and use last settings: --------------------
|
||||||
QByteArray myBA;
|
QByteArray myBA;
|
||||||
myBA=datei_readFromFile(FILENAME_COMPORT);
|
myBA=datei_readFromFile(FILENAME_COMPORT);
|
||||||
|
if (myBA.length()>0)
|
||||||
|
{
|
||||||
|
bs=csv_getEntryAsString(myBA,0); // read the 's' war 2!??
|
||||||
|
br=csv_getEntryAsInt(myBA,1); // z.B. 5 (5.Eintrag in der Baud-Liste)
|
||||||
|
bs=csv_getEntryAsString(myBA,2); // z.B 115200
|
||||||
|
cn=csv_getEntryAsString(myBA,3); // z.B. COM9
|
||||||
|
ci=csv_getEntryAsInt(myBA,4); // Eintragsnummer in COM-Fenster
|
||||||
|
HWaccess->dc_openSerial(br,bs,cn,1);
|
||||||
|
CB_portSel->setCurrentIndex(ci); // den Port aus der Datei hier vorgeben
|
||||||
|
connectButton->setChecked(true); // connect Taste "druecken"
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
// open with default settings
|
||||||
|
qDebug()<<"CArunGui: open serial with default values";
|
||||||
|
|
||||||
//uint32_t len= datei_nrOfEntriesInFile(myBA);
|
bs="115200";
|
||||||
//uint64_t ulltmp=csv_getEntryAs2Ulong(myBA,0);
|
br=5;
|
||||||
//qDebug()<<"win_startup load long numer: "<<ulltmp;
|
//cn="COM14"; // Windows
|
||||||
|
cn="ttymxc2"; // PTU5
|
||||||
QString bs=csv_getEntryAsString(myBA,0); // read the 's' war 2!??
|
ci=2;
|
||||||
int br=csv_getEntryAsInt(myBA,1); // z.B. 5 (5.Eintrag in der Baud-Liste)
|
HWaccess->dc_openSerial(br,bs,cn,1);
|
||||||
bs=csv_getEntryAsString(myBA,2); // z.B 115200
|
|
||||||
QString cn=csv_getEntryAsString(myBA,3); // z.B. COM9
|
|
||||||
int ci=csv_getEntryAsInt(myBA,4); // Eintragsnummer in COM-Fenster
|
|
||||||
//qDebug()<<"win_startup loaded com settings: "<<br<<" "<<bs<<" "<<cn;
|
|
||||||
HWaccess->dc_openSerial(br,bs,cn,1);
|
|
||||||
//CB_baudSel->setCurrentIndex(br); // im BR auswahlfenster diese Baud vorgeben
|
|
||||||
CB_portSel->setCurrentIndex(ci); // den Port aus der Datei hier vorgeben
|
|
||||||
connectButton->setChecked(true); // connect Taste "druecken"
|
|
||||||
|
|
||||||
|
}
|
||||||
myTO->start(100); // restart
|
myTO->start(100); // restart
|
||||||
myStep++;
|
myStep++;
|
||||||
} else
|
} else
|
||||||
@@ -410,9 +420,13 @@ bool T_winComPort::working(uint16_t *nextScreen, uint8_t *useNavi)
|
|||||||
if (!myTO->isActive())
|
if (!myTO->isActive())
|
||||||
{
|
{
|
||||||
if (HWaccess->dc_isPortOpen())
|
if (HWaccess->dc_isPortOpen())
|
||||||
|
{
|
||||||
myStep++;
|
myStep++;
|
||||||
else
|
} else
|
||||||
myStep=99; // stop automatic connection and wait for manual start
|
{
|
||||||
|
myStep=6; // 13.12.23: start Autoconnect cycle
|
||||||
|
qDebug()<<"CArunGui: port is still closed, restarting..";
|
||||||
|
}
|
||||||
myTO->start(100);
|
myTO->start(100);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
@@ -434,7 +448,10 @@ bool T_winComPort::working(uint16_t *nextScreen, uint8_t *useNavi)
|
|||||||
if (HWaccess->dc_readAnswTestResponse())
|
if (HWaccess->dc_readAnswTestResponse())
|
||||||
myStep++; // response was correct
|
myStep++; // response was correct
|
||||||
else
|
else
|
||||||
myStep=99; // stop automatic connection and wait for manual start
|
{
|
||||||
|
myStep=6; // 13.12.23: start Autoconnect cycle
|
||||||
|
qDebug()<<"CArunGui: got no answer from DC, retry..";
|
||||||
|
}
|
||||||
myTO->start(100);
|
myTO->start(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -445,23 +462,38 @@ bool T_winComPort::working(uint16_t *nextScreen, uint8_t *useNavi)
|
|||||||
HWaccess->dc_autoRequest(1);
|
HWaccess->dc_autoRequest(1);
|
||||||
AutSendButton->setChecked(true); // taste "druecken"
|
AutSendButton->setChecked(true); // taste "druecken"
|
||||||
myStep++;
|
myStep++;
|
||||||
|
myTO->start(2000);
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if (myStep==5)
|
if (myStep==5)
|
||||||
{
|
{
|
||||||
// got next screen:
|
if (!myTO->isActive())
|
||||||
//myNextStep=2; // nicht bei CArun
|
{
|
||||||
myStep++;
|
if (HWaccess->sys_areDCdataValid())
|
||||||
|
{
|
||||||
|
qDebug()<<"CArunGui: DC is connected";
|
||||||
|
myStep=7; // OK, connection is up and running
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
qDebug()<<"CArunGui: auto request is not running, retry...";
|
||||||
|
myStep++;
|
||||||
|
myTO->start(100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if (myStep==6)
|
if (myStep==6)
|
||||||
{
|
{
|
||||||
// stop here, everything done
|
// restart autoconnect cycle
|
||||||
|
myTO->start(100); // restart
|
||||||
|
myStep=0;
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if (myStep==7)
|
if (myStep==7)
|
||||||
{
|
{
|
||||||
|
// stay here, DC connection is up and running
|
||||||
|
|
||||||
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
@@ -470,7 +502,6 @@ bool T_winComPort::working(uint16_t *nextScreen, uint8_t *useNavi)
|
|||||||
|
|
||||||
if (myNextStep)
|
if (myNextStep)
|
||||||
{
|
{
|
||||||
//qDebug()<<"fenster1 working: "<< myNextStep;
|
|
||||||
*nextScreen=myNextStep;
|
*nextScreen=myNextStep;
|
||||||
myNextStep=0;
|
myNextStep=0;
|
||||||
}
|
}
|
||||||
|
@@ -81,29 +81,23 @@ contains( CONFIG, PTU5_YOCTO ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
$${PWD}/include/com.h \
|
|
||||||
$${PWD}/include/datei.h \
|
$${PWD}/include/datei.h \
|
||||||
$${PWD}/include/runProc.h \
|
$${PWD}/include/runProc.h \
|
||||||
$${PWD}/include/controlBus.h \
|
$${PWD}/include/controlBus.h \
|
||||||
$${PWD}/include/datIf.h \
|
|
||||||
$${PWD}/include/dcBL.h \
|
$${PWD}/include/dcBL.h \
|
||||||
$${PWD}/include/hwapi.h \
|
$${PWD}/include/hwapi.h \
|
||||||
$${PWD}/include/interfaces.h \
|
$${PWD}/include/interfaces.h \
|
||||||
$${PWD}/include/prot.h \
|
|
||||||
$${PWD}/include/sendWRcmd.h \
|
$${PWD}/include/sendWRcmd.h \
|
||||||
$${PWD}/include/storeINdata.h \
|
$${PWD}/include/storeINdata.h \
|
||||||
$${PWD}/include/tslib.h \
|
$${PWD}/include/tslib.h \
|
||||||
$${PWD}/include/shared_mem_buffer.h
|
$${PWD}/include/shared_mem_buffer.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$${PWD}/src/com.cpp \
|
|
||||||
$${PWD}/src/datei.cpp \
|
$${PWD}/src/datei.cpp \
|
||||||
$${PWD}/src/runProc.cpp \
|
$${PWD}/src/runProc.cpp \
|
||||||
$${PWD}/src/controlBus.cpp \
|
$${PWD}/src/controlBus.cpp \
|
||||||
$${PWD}/src/datIf.cpp \
|
|
||||||
$${PWD}/src/dcBL.cpp \
|
$${PWD}/src/dcBL.cpp \
|
||||||
$${PWD}/src/hwapi.cpp \
|
$${PWD}/src/hwapi.cpp \
|
||||||
$${PWD}/src/prot.cpp \
|
|
||||||
$${PWD}/src/sendWRcmd.cpp \
|
$${PWD}/src/sendWRcmd.cpp \
|
||||||
$${PWD}/src/storeINdata.cpp \
|
$${PWD}/src/storeINdata.cpp \
|
||||||
$${PWD}/src/tslib.cpp \
|
$${PWD}/src/tslib.cpp \
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
|
|
||||||
CONFIG += ordered
|
CONFIG += ordered
|
||||||
SUBDIRS = lib_ca_master lib_ca_slave CArunGUI dCArun
|
SUBDIRS = lib_ca_master lib_ca_slave CArunGUI dCArun
|
||||||
|
|
||||||
|
@@ -375,6 +375,9 @@ bool T_winComPort::working(uint16_t *nextScreen, uint8_t *useNavi)
|
|||||||
// bit0,1: enable/disable button "next"
|
// bit0,1: enable/disable button "next"
|
||||||
// bit2,3: enable/disable button "home"
|
// bit2,3: enable/disable button "home"
|
||||||
// bit4,5: enable/disable button "back"
|
// bit4,5: enable/disable button "back"
|
||||||
|
QString bs, cn;
|
||||||
|
int br, ci;
|
||||||
|
|
||||||
|
|
||||||
this->updateGui();
|
this->updateGui();
|
||||||
*nextScreen=0; // 0=no change
|
*nextScreen=0; // 0=no change
|
||||||
@@ -385,22 +388,29 @@ bool T_winComPort::working(uint16_t *nextScreen, uint8_t *useNavi)
|
|||||||
// load and use last settings: --------------------
|
// load and use last settings: --------------------
|
||||||
QByteArray myBA;
|
QByteArray myBA;
|
||||||
myBA=datei_readFromFile(FILENAME_COMPORT);
|
myBA=datei_readFromFile(FILENAME_COMPORT);
|
||||||
|
if (myBA.length()>0)
|
||||||
|
{
|
||||||
|
bs=csv_getEntryAsString(myBA,0); // read the 's' war 2!??
|
||||||
|
br=csv_getEntryAsInt(myBA,1); // z.B. 5 (5.Eintrag in der Baud-Liste)
|
||||||
|
bs=csv_getEntryAsString(myBA,2); // z.B 115200
|
||||||
|
cn=csv_getEntryAsString(myBA,3); // z.B. COM9
|
||||||
|
ci=csv_getEntryAsInt(myBA,4); // Eintragsnummer in COM-Fenster
|
||||||
|
HWaccess->dc_openSerial(br,bs,cn,1);
|
||||||
|
CB_portSel->setCurrentIndex(ci); // den Port aus der Datei hier vorgeben
|
||||||
|
connectButton->setChecked(true); // connect Taste "druecken"
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
// open with default settings
|
||||||
|
qDebug()<<"CArunGui: open serial with default values";
|
||||||
|
|
||||||
//uint32_t len= datei_nrOfEntriesInFile(myBA);
|
bs="115200";
|
||||||
//uint64_t ulltmp=csv_getEntryAs2Ulong(myBA,0);
|
br=5;
|
||||||
//qDebug()<<"win_startup load long numer: "<<ulltmp;
|
//cn="COM14"; // Windows
|
||||||
|
cn="ttymxc2"; // PTU5
|
||||||
QString bs=csv_getEntryAsString(myBA,0); // read the 's' war 2!??
|
ci=2;
|
||||||
int br=csv_getEntryAsInt(myBA,1); // z.B. 5 (5.Eintrag in der Baud-Liste)
|
HWaccess->dc_openSerial(br,bs,cn,1);
|
||||||
bs=csv_getEntryAsString(myBA,2); // z.B 115200
|
|
||||||
QString cn=csv_getEntryAsString(myBA,3); // z.B. COM9
|
|
||||||
int ci=csv_getEntryAsInt(myBA,4); // Eintragsnummer in COM-Fenster
|
|
||||||
//qDebug()<<"win_startup loaded com settings: "<<br<<" "<<bs<<" "<<cn;
|
|
||||||
HWaccess->dc_openSerial(br,bs,cn,1);
|
|
||||||
//CB_baudSel->setCurrentIndex(br); // im BR auswahlfenster diese Baud vorgeben
|
|
||||||
CB_portSel->setCurrentIndex(ci); // den Port aus der Datei hier vorgeben
|
|
||||||
connectButton->setChecked(true); // connect Taste "druecken"
|
|
||||||
|
|
||||||
|
}
|
||||||
myTO->start(100); // restart
|
myTO->start(100); // restart
|
||||||
myStep++;
|
myStep++;
|
||||||
} else
|
} else
|
||||||
@@ -410,9 +420,13 @@ bool T_winComPort::working(uint16_t *nextScreen, uint8_t *useNavi)
|
|||||||
if (!myTO->isActive())
|
if (!myTO->isActive())
|
||||||
{
|
{
|
||||||
if (HWaccess->dc_isPortOpen())
|
if (HWaccess->dc_isPortOpen())
|
||||||
|
{
|
||||||
myStep++;
|
myStep++;
|
||||||
else
|
} else
|
||||||
myStep=99; // stop automatic connection and wait for manual start
|
{
|
||||||
|
myStep=6; // 13.12.23: start Autoconnect cycle
|
||||||
|
qDebug()<<"CArunGui: port is still closed, restarting..";
|
||||||
|
}
|
||||||
myTO->start(100);
|
myTO->start(100);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
@@ -434,7 +448,10 @@ bool T_winComPort::working(uint16_t *nextScreen, uint8_t *useNavi)
|
|||||||
if (HWaccess->dc_readAnswTestResponse())
|
if (HWaccess->dc_readAnswTestResponse())
|
||||||
myStep++; // response was correct
|
myStep++; // response was correct
|
||||||
else
|
else
|
||||||
myStep=99; // stop automatic connection and wait for manual start
|
{
|
||||||
|
myStep=6; // 13.12.23: start Autoconnect cycle
|
||||||
|
qDebug()<<"CArunGui: got no answer from DC, retry..";
|
||||||
|
}
|
||||||
myTO->start(100);
|
myTO->start(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -445,23 +462,38 @@ bool T_winComPort::working(uint16_t *nextScreen, uint8_t *useNavi)
|
|||||||
HWaccess->dc_autoRequest(1);
|
HWaccess->dc_autoRequest(1);
|
||||||
AutSendButton->setChecked(true); // taste "druecken"
|
AutSendButton->setChecked(true); // taste "druecken"
|
||||||
myStep++;
|
myStep++;
|
||||||
|
myTO->start(2000);
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if (myStep==5)
|
if (myStep==5)
|
||||||
{
|
{
|
||||||
// got next screen:
|
if (!myTO->isActive())
|
||||||
//myNextStep=2; // nicht bei CArun
|
{
|
||||||
myStep++;
|
if (HWaccess->sys_areDCdataValid())
|
||||||
|
{
|
||||||
|
qDebug()<<"CArunGui: DC is connected";
|
||||||
|
myStep=7; // OK, connection is up and running
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
qDebug()<<"CArunGui: auto request is not running, retry...";
|
||||||
|
myStep++;
|
||||||
|
myTO->start(100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if (myStep==6)
|
if (myStep==6)
|
||||||
{
|
{
|
||||||
// stop here, everything done
|
// restart autoconnect cycle
|
||||||
|
myTO->start(100); // restart
|
||||||
|
myStep=0;
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if (myStep==7)
|
if (myStep==7)
|
||||||
{
|
{
|
||||||
|
// stay here, DC connection is up and running
|
||||||
|
|
||||||
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
@@ -470,7 +502,6 @@ bool T_winComPort::working(uint16_t *nextScreen, uint8_t *useNavi)
|
|||||||
|
|
||||||
if (myNextStep)
|
if (myNextStep)
|
||||||
{
|
{
|
||||||
//qDebug()<<"fenster1 working: "<< myNextStep;
|
|
||||||
*nextScreen=myNextStep;
|
*nextScreen=myNextStep;
|
||||||
myNextStep=0;
|
myNextStep=0;
|
||||||
}
|
}
|
||||||
|
@@ -39,9 +39,10 @@ V4.0 6.9.2023: activating DC-Bootloader in slve-lib (SM)
|
|||||||
#include "controlBus.h"
|
#include "controlBus.h"
|
||||||
#include "storeINdata.h"
|
#include "storeINdata.h"
|
||||||
#include "dcBL.h"
|
#include "dcBL.h"
|
||||||
#include "interfaces.h"
|
//#include <../plugins/interfaces.h>
|
||||||
#include "shared_mem_buffer.h"
|
#include "shared_mem_buffer.h"
|
||||||
#include "runProc.h"
|
#include "runProc.h"
|
||||||
|
#include "interfaces.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -73,8 +74,8 @@ V4.0 6.9.2023: activating DC-Bootloader in slve-lib (SM)
|
|||||||
//for CAslave:
|
//for CAslave:
|
||||||
//#undef THIS_IS_CA_MASTER
|
//#undef THIS_IS_CA_MASTER
|
||||||
|
|
||||||
//for CAmaster:
|
//for CAmaster:
|
||||||
#define THIS_IS_CA_MASTER
|
//#define THIS_IS_CA_MASTER
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1298,8 +1299,15 @@ public:
|
|||||||
|
|
||||||
uint8_t bna_getCurrentNotes(uint16_t latestBill, uint16_t *currentNotes) const override;
|
uint8_t bna_getCurrentNotes(uint16_t latestBill, uint16_t *currentNotes) const override;
|
||||||
// returns number of collected bank notes since start-command (current transaction)
|
// returns number of collected bank notes since start-command (current transaction)
|
||||||
// latestBill: last accepted bank note, value in cent
|
// return value: numbers of bills or 99 in case of error
|
||||||
// currentNotes an array with up to 16 (further) notes collected
|
// 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)
|
||||||
|
|
||||||
void bna_requestStackerLevel(void) const override;
|
void bna_requestStackerLevel(void) const override;
|
||||||
|
|
||||||
|
@@ -24,7 +24,8 @@ struct T_emp
|
|||||||
|
|
||||||
// dynamic:
|
// dynamic:
|
||||||
uint8_t state; // step counter of EMP (electronic coin checker) FSM (finite state machine):
|
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
|
// 1=powered, do emp ini, send reset
|
||||||
// 2=delay
|
// 2=delay
|
||||||
// 3=wait for response, requesting status after response
|
// 3=wait for response, requesting status after response
|
||||||
@@ -39,7 +40,7 @@ struct T_emp
|
|||||||
// 90: stop all, 1s delay
|
// 90: stop all, 1s delay
|
||||||
// 99: off, all stopped
|
// 99: off, all stopped
|
||||||
|
|
||||||
|
*/
|
||||||
uint8_t pollingRunning;
|
uint8_t pollingRunning;
|
||||||
uint8_t paymentRunning;
|
uint8_t paymentRunning;
|
||||||
|
|
||||||
@@ -238,6 +239,7 @@ struct T_dynamicCondition
|
|||||||
uint8_t lastVDoorState;
|
uint8_t lastVDoorState;
|
||||||
uint8_t lastCBstate;
|
uint8_t lastCBstate;
|
||||||
char paymentInProgress;
|
char paymentInProgress;
|
||||||
|
// Version Szeged: aug2023
|
||||||
// 0: stopped by timeout
|
// 0: stopped by timeout
|
||||||
// 1: running 2: wait4lastCoin
|
// 1: running 2: wait4lastCoin
|
||||||
// 3: payment stopped manually, coins in Escrow
|
// 3: payment stopped manually, coins in Escrow
|
||||||
@@ -246,6 +248,21 @@ struct T_dynamicCondition
|
|||||||
// 6: coins encashed 7:coins returned
|
// 6: coins encashed 7:coins returned
|
||||||
// 8: CoinChecker or MDB on Error
|
// 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;
|
char res1;
|
||||||
uint16_t U_Batt;
|
uint16_t U_Batt;
|
||||||
@@ -2252,14 +2269,23 @@ public:
|
|||||||
virtual void bna_requestCurrentNotes() const {}
|
virtual void bna_requestCurrentNotes() const {}
|
||||||
// send command to DC in order to get transaction data
|
// 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(latestBill);
|
||||||
Q_UNUSED(currentNotes);
|
Q_UNUSED(currentNotes);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// returns number of collected bank notes since start-command (current transaction)
|
// returns number of collected bank notes since start-command (current transaction)
|
||||||
// latestBill: last accepted bank note, value in cent
|
// return value: numbers of bills or 99 in case of error
|
||||||
// currentNotes an array with up to 16 (further) notes collected
|
// 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 {}
|
virtual void bna_requestStackerLevel() const {}
|
||||||
|
|
||||||
|
@@ -527,6 +527,9 @@ void gpi_storeDcDataValid(bool isVal);
|
|||||||
|
|
||||||
bool epi_areDcDataValid();
|
bool epi_areDcDataValid();
|
||||||
|
|
||||||
|
void epi_setDcDataValid(void);
|
||||||
|
|
||||||
|
void epi_resetDcDataValid(void);
|
||||||
|
|
||||||
|
|
||||||
void epi_clearDynData(void);
|
void epi_clearDynData(void);
|
||||||
|
@@ -2,8 +2,19 @@ TEMPLATE = lib
|
|||||||
TARGET = CAmaster
|
TARGET = CAmaster
|
||||||
VERSION="1.0.0"
|
VERSION="1.0.0"
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
../include/com.h \
|
||||||
|
../include/datIf.h \
|
||||||
|
../include/prot.h
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
../src/com.cpp \
|
||||||
|
../src/datIf.cpp \
|
||||||
|
../src/prot.cpp
|
||||||
|
|
||||||
include(../DCLibraries.pri)
|
include(../DCLibraries.pri)
|
||||||
|
|
||||||
|
|
||||||
DEFINES+=THIS_IS_CA_MASTER
|
DEFINES+=THIS_IS_CA_MASTER
|
||||||
DESTDIR=$${_PRO_FILE_PWD_}/../build
|
DESTDIR=$${_PRO_FILE_PWD_}/../build
|
||||||
|
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
|
/*
|
||||||
|
History:
|
||||||
|
06.12.2023: weitere IN-requests in Autorequest übernommen
|
||||||
|
Umschaltung mit/ohne Verkauf, während VK nur 12 wichtige, sonst alle 36
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
#include "datIf.h"
|
#include "datIf.h"
|
||||||
#include "sendWRcmd.h"
|
#include "sendWRcmd.h"
|
||||||
#include "controlBus.h"
|
#include "controlBus.h"
|
||||||
@@ -81,7 +88,8 @@ T_datif::T_datif(QObject *parent) : QObject(parent)
|
|||||||
dif_scanStep=0;
|
dif_scanStep=0;
|
||||||
selectedSlaveAddr=FIX_SLAVE_ADDR;
|
selectedSlaveAddr=FIX_SLAVE_ADDR;
|
||||||
cycl_running=0;
|
cycl_running=0;
|
||||||
gpi_storeDcDataValid(0); // data are not yet valid, no response from DC by now
|
epi_resetDcDataValid(); // data are not yet valid, no response from DC by now
|
||||||
|
|
||||||
datif_noResponseCtr=0;
|
datif_noResponseCtr=0;
|
||||||
|
|
||||||
datif_repeatCtr=0;
|
datif_repeatCtr=0;
|
||||||
@@ -137,14 +145,14 @@ char T_datif::datif_cycleSend()
|
|||||||
if ( !myDCIF->isPortOpen())
|
if ( !myDCIF->isPortOpen())
|
||||||
{
|
{
|
||||||
//qDebug() << "com port not available"; // wird ununterbrochen ausgegeben
|
//qDebug() << "com port not available"; // wird ununterbrochen ausgegeben
|
||||||
gpi_storeDcDataValid(0); // DC data not valid
|
epi_resetDcDataValid(); // DC data not valid
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// supervise if DC data are valid
|
// supervise if DC data are valid
|
||||||
datif_noResponseCtr++; // inc every 20ms
|
datif_noResponseCtr++; // inc every 20ms
|
||||||
if (datif_noResponseCtr>250) // no life sign from device controller (DC) for about 3s
|
if (datif_noResponseCtr>250) // no life sign from device controller (DC) for about 3s
|
||||||
gpi_storeDcDataValid(0); // DC data has not updated for >=5s -> no longer valid!
|
epi_resetDcDataValid(); // DC data has not updated for >=5s -> no longer valid!
|
||||||
|
|
||||||
// Ueberwachung ob ein oder mehrere Commands am Stueck erfolgreich waren
|
// Ueberwachung ob ein oder mehrere Commands am Stueck erfolgreich waren
|
||||||
if (gpi_wantToResetSupervision())
|
if (gpi_wantToResetSupervision())
|
||||||
@@ -337,7 +345,7 @@ char T_datif::datif_cycleSend()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
dif_scanStep=0; // always start from beginning
|
dif_scanStep=0; // always start from beginning
|
||||||
gpi_storeDcDataValid(0);
|
epi_resetDcDataValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
datif_cmdWasPerformed=0; // 0: no response by now
|
datif_cmdWasPerformed=0; // 0: no response by now
|
||||||
@@ -362,8 +370,8 @@ char T_datif::sendINrequestsAutomatic(void)
|
|||||||
uint8_t datif_maxNrCommands=35, datif_sendNow;
|
uint8_t datif_maxNrCommands=35, datif_sendNow;
|
||||||
|
|
||||||
// send quicker while transaction is ongoing:
|
// send quicker while transaction is ongoing:
|
||||||
uint8_t datif_vendRequCommandList[15]={102,107,108,110,112,115,116,31,32,40,41,42,0,0,0};
|
uint8_t datif_vendRequCommandList[15]={102,107,108,110,112,115,116,31,32,40,41,42,23,0,0};
|
||||||
uint8_t datif_maxVendingCmds=12;
|
uint8_t datif_maxVendingCmds=13;
|
||||||
|
|
||||||
// special commands:
|
// special commands:
|
||||||
// 102: get IOs run constantly!!!
|
// 102: get IOs run constantly!!!
|
||||||
@@ -1029,7 +1037,7 @@ char T_datif::loadRecDataFromFrame()
|
|||||||
case 31: // Get dynamic machine conditions (doors, voltage, alarm….)
|
case 31: // Get dynamic machine conditions (doors, voltage, alarm….)
|
||||||
if (RdDleng>50)
|
if (RdDleng>50)
|
||||||
{
|
{
|
||||||
gpi_storeDcDataValid(1); // DC-Data are valid as DC responded.
|
epi_setDcDataValid(); // DC-Data are valid as DC responded.
|
||||||
// Could be set to every response but this (31)
|
// Could be set to every response but this (31)
|
||||||
// is a very common and very important request
|
// is a very common and very important request
|
||||||
gpi_storeDynMachineConditions(RdDleng, receivedData);
|
gpi_storeDynMachineConditions(RdDleng, receivedData);
|
||||||
|
@@ -49,9 +49,21 @@ hwapi::hwapi(QWidget *parent) : QObject(parent)
|
|||||||
// {
|
// {
|
||||||
|
|
||||||
#ifdef THIS_IS_CA_MASTER
|
#ifdef THIS_IS_CA_MASTER
|
||||||
|
|
||||||
|
#ifdef THIS_IS_CA_SLAVE
|
||||||
|
#error "SLAVE LIB COMPILED INTO MASTER"
|
||||||
|
#endif
|
||||||
|
|
||||||
myDatif = new T_datif(); // für die CAslave-Lib auskommentieren!
|
myDatif = new T_datif(); // für die CAslave-Lib auskommentieren!
|
||||||
#else
|
|
||||||
qCritical()<<"hwapi: error CAslave cannot include T_datif";
|
#endif
|
||||||
|
|
||||||
|
#ifdef THIS_IS_CA_SLAVE
|
||||||
|
|
||||||
|
#ifdef THIS_IS_CA_MASTER
|
||||||
|
#error "MASTER LIB COMPILED INTO MASTER"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@@ -1782,6 +1794,8 @@ void hwapi::prn_sendText(QByteArray *buf) const
|
|||||||
uint16_t nn, pp, mm, leng_byt, leng_blk, llb, freeStak;
|
uint16_t nn, pp, mm, leng_byt, leng_blk, llb, freeStak;
|
||||||
uint8_t tmp66[66];
|
uint8_t tmp66[66];
|
||||||
|
|
||||||
|
qCritical() << __PRETTY_FUNCTION__ << "RESET DC DATA VALID";
|
||||||
|
|
||||||
epi_clearDynMachineConditions(); // 24.6.23
|
epi_clearDynMachineConditions(); // 24.6.23
|
||||||
gpi_storeDcDataValid(0);
|
gpi_storeDcDataValid(0);
|
||||||
|
|
||||||
@@ -2886,6 +2900,8 @@ bool hwapi::prn_printTemplate(uint8_t nrOftemplate) const
|
|||||||
{
|
{
|
||||||
// return true if sending, false if cmd-stack is full
|
// return true if sending, false if cmd-stack is full
|
||||||
|
|
||||||
|
qCritical() << __PRETTY_FUNCTION__ << "RESET DC DATA VALID";
|
||||||
|
|
||||||
epi_clearDynMachineConditions(); // 24.6.23
|
epi_clearDynMachineConditions(); // 24.6.23
|
||||||
gpi_storeDcDataValid(0);
|
gpi_storeDcDataValid(0);
|
||||||
|
|
||||||
@@ -2990,6 +3006,8 @@ bool hwapi::log_getVaultRecord(struct T_vaultRecord *retVR) const
|
|||||||
|
|
||||||
bool hwapi::prn_printAccountReceipt(void) const
|
bool hwapi::prn_printAccountReceipt(void) const
|
||||||
{
|
{
|
||||||
|
qCritical() << __PRETTY_FUNCTION__ << "RESET DC DATA VALID";
|
||||||
|
|
||||||
epi_clearDynMachineConditions(); // 24.6.23
|
epi_clearDynMachineConditions(); // 24.6.23
|
||||||
gpi_storeDcDataValid(0);
|
gpi_storeDcDataValid(0);
|
||||||
return sendFDcmd_set(154, 0,0, 0,0,0,0);
|
return sendFDcmd_set(154, 0,0, 0,0,0,0);
|
||||||
@@ -2997,6 +3015,8 @@ bool hwapi::prn_printAccountReceipt(void) const
|
|||||||
|
|
||||||
bool hwapi::prn_printTestTicket(void) const
|
bool hwapi::prn_printTestTicket(void) const
|
||||||
{
|
{
|
||||||
|
qCritical() << __PRETTY_FUNCTION__ << "RESET DC DATA VALID";
|
||||||
|
|
||||||
// return true if sending to DC OK, false if cmd-stack is full
|
// return true if sending to DC OK, false if cmd-stack is full
|
||||||
epi_clearDynMachineConditions(); // 24.6.23
|
epi_clearDynMachineConditions(); // 24.6.23
|
||||||
gpi_storeDcDataValid(0);
|
gpi_storeDcDataValid(0);
|
||||||
@@ -3299,22 +3319,15 @@ void hwapi::sys_restoreDeviceParameter(struct T_devices *deviceSettings) const
|
|||||||
// attention: only applies if function "sys_sendDeviceParameter()" was used to send this settings before
|
// attention: only applies if function "sys_sendDeviceParameter()" was used to send this settings before
|
||||||
// cannot be used to see settings programmed by JsonFile
|
// cannot be used to see settings programmed by JsonFile
|
||||||
uint8_t buf[64];
|
uint8_t buf[64];
|
||||||
uint8_t LL, nn;
|
uint8_t LL;
|
||||||
tslib_strclr(buf,0,64);
|
tslib_strclr(buf,0,64);
|
||||||
uint8_t *start;
|
|
||||||
|
|
||||||
//runProcess->epi_restore64BdevParameter(&LL, buf); // wozu die???
|
//runProcess->epi_restore64BdevParameter(&LL, buf); // wozu die???
|
||||||
epi_restoreRbDeviceSettings(&LL, buf); // viel besser, stimmt immer
|
epi_restoreRbDeviceSettings(&LL, buf); // viel besser, stimmt immer
|
||||||
|
|
||||||
// Puffer in struct eintragen:
|
Q_STATIC_ASSERT(sizeof(*deviceSettings) <= sizeof(buf));
|
||||||
start = &deviceSettings->kindOfPrinter;
|
|
||||||
nn=0;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
*start = buf[nn];
|
|
||||||
start++;
|
|
||||||
} while(++nn<LL);
|
|
||||||
|
|
||||||
|
memcpy(deviceSettings, buf, sizeof(*deviceSettings));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hwapi::sys_areDCdataValid(void) const
|
bool hwapi::sys_areDCdataValid(void) const
|
||||||
@@ -3426,6 +3439,8 @@ bool hwapi::prn_printKombiticket(uint8_t nrOfKombi) const
|
|||||||
if ((nrOfKombi<1) || (nrOfKombi>8))
|
if ((nrOfKombi<1) || (nrOfKombi>8))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
qCritical() << __PRETTY_FUNCTION__ << "RESET DC DATA VALID";
|
||||||
|
|
||||||
epi_clearDynMachineConditions(); // 24.6.23
|
epi_clearDynMachineConditions(); // 24.6.23
|
||||||
gpi_storeDcDataValid(0);
|
gpi_storeDcDataValid(0);
|
||||||
|
|
||||||
@@ -3556,6 +3571,8 @@ bool hwapi::log_getVaultData(uint8_t *data) const
|
|||||||
// new from 1.8.23
|
// new from 1.8.23
|
||||||
bool hwapi::prn_printOneAccountReceipt(uint16_t accountNr) const
|
bool hwapi::prn_printOneAccountReceipt(uint16_t accountNr) const
|
||||||
{
|
{
|
||||||
|
qCritical() << __PRETTY_FUNCTION__ << "RESET DC DATA VALID";
|
||||||
|
|
||||||
// print one out of eight stored last accounting receipts
|
// print one out of eight stored last accounting receipts
|
||||||
// function log_getHoldAccountNumbers() gives a list of acc-Nr. of the stored receipts
|
// function log_getHoldAccountNumbers() gives a list of acc-Nr. of the stored receipts
|
||||||
epi_clearDynMachineConditions(); // 24.6.23
|
epi_clearDynMachineConditions(); // 24.6.23
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "controlBus.h"
|
#include "controlBus.h"
|
||||||
#include "dcBL.h"
|
#include "dcBL.h"
|
||||||
#include "interfaces.h"
|
|
||||||
|
|
||||||
static uint32_t hwapi_lastStartAmount;
|
static uint32_t hwapi_lastStartAmount;
|
||||||
static uint32_t hwapi_lastTotalAmount;
|
static uint32_t hwapi_lastTotalAmount;
|
||||||
@@ -166,6 +165,7 @@ uint8_t T_runProc::cash_paymentProcessing(void)
|
|||||||
|
|
||||||
sub_getDynMachineConditions(&myDynMachCond);
|
sub_getDynMachineConditions(&myDynMachCond);
|
||||||
payInProg= myDynMachCond.paymentInProgress;
|
payInProg= myDynMachCond.paymentInProgress;
|
||||||
|
// Version Szeged: aug2023
|
||||||
// 0: stopped by timeout
|
// 0: stopped by timeout
|
||||||
// 1: running 2: wait4lastCoin
|
// 1: running 2: wait4lastCoin
|
||||||
// 3: payment stopped manually, coins in Escrow
|
// 3: payment stopped manually, coins in Escrow
|
||||||
@@ -175,9 +175,26 @@ uint8_t T_runProc::cash_paymentProcessing(void)
|
|||||||
// 7: coins returned 2 cases: due to cancel-button or printer-error
|
// 7: coins returned 2 cases: due to cancel-button or printer-error
|
||||||
// 8: CoinChecker or MDB on Error
|
// 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"
|
||||||
|
|
||||||
|
|
||||||
// qCritical() << "emitting signal payCancelled";
|
// qCritical() << "emitting signal payCancelled";
|
||||||
// emit runProc_payCancelled();
|
// emit runProc_payCancelled();
|
||||||
|
/*
|
||||||
|
// gabs bei Szeged, jetzt nicht mehr:
|
||||||
if (payInProg==8)
|
if (payInProg==8)
|
||||||
{
|
{
|
||||||
// coin checker faulty, cannot start
|
// coin checker faulty, cannot start
|
||||||
@@ -188,11 +205,11 @@ uint8_t T_runProc::cash_paymentProcessing(void)
|
|||||||
emit runProc_coinCollectionAborted();
|
emit runProc_coinCollectionAborted();
|
||||||
//sendFDcmd_set(156, 0,0, 2,0,0,0); // cancel payment
|
//sendFDcmd_set(156, 0,0, 2,0,0,0); // cancel payment
|
||||||
}
|
}
|
||||||
|
|
||||||
return 10; // error cannot start
|
return 10; // error cannot start
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (empState>=10 && empState<=12 && (payInProg==1 || payInProg==2) )
|
// if (empState>=10 && empState<=12 && (payInProg==1 || payInProg==2) ) // Szeged
|
||||||
|
if ( payInProg==2 ) //8.12.23
|
||||||
{
|
{
|
||||||
// coin acceptance is active now:
|
// coin acceptance is active now:
|
||||||
if (hwapi_paymentStarted==1) // && (( payInProg==0) || ( payInProg>5))) //16.6.23
|
if (hwapi_paymentStarted==1) // && (( payInProg==0) || ( payInProg>5))) //16.6.23
|
||||||
@@ -225,7 +242,8 @@ uint8_t T_runProc::cash_paymentProcessing(void)
|
|||||||
|
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if (payInProg==3) // user pressed "Next/Continue", keep coin
|
//if (payInProg==3) // user pressed "Next/Continue", keep coin
|
||||||
|
if (payInProg==4) // user pressed "Next/Continue", keep coin since nov2023
|
||||||
{
|
{
|
||||||
hwapi_paymentStarted++;
|
hwapi_paymentStarted++;
|
||||||
collActiv=3;
|
collActiv=3;
|
||||||
@@ -233,7 +251,8 @@ uint8_t T_runProc::cash_paymentProcessing(void)
|
|||||||
emit runProc_payStopByPushbutton();
|
emit runProc_payStopByPushbutton();
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if (payInProg==4) // max achieved, keep coins
|
//if (payInProg==4) // max achieved, keep coins
|
||||||
|
if (payInProg==5) // max achieved, keep coins since nov2023
|
||||||
{
|
{
|
||||||
hwapi_paymentStarted++;
|
hwapi_paymentStarted++;
|
||||||
collActiv=4;
|
collActiv=4;
|
||||||
@@ -241,7 +260,8 @@ uint8_t T_runProc::cash_paymentProcessing(void)
|
|||||||
emit runProc_payStopByMax();
|
emit runProc_payStopByMax();
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if (payInProg==5) // escrow full, keep coins
|
//if (payInProg==5) // escrow full, keep coins
|
||||||
|
if (payInProg==6) // escrow full, keep coins since nov2023
|
||||||
{
|
{
|
||||||
hwapi_paymentStarted++;
|
hwapi_paymentStarted++;
|
||||||
collActiv=5;
|
collActiv=5;
|
||||||
@@ -249,14 +269,14 @@ uint8_t T_runProc::cash_paymentProcessing(void)
|
|||||||
emit runProc_payStopByEscrow();
|
emit runProc_payStopByEscrow();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 5.10.23 raus, geht auf 99 wenn Betrag erreicht, ist aber kein fehler
|
// 5.10.23 raus, geht auf 99 wenn Betrag erreicht, ist aber kein fehler
|
||||||
if ( (empState<10) || (empState>12)) // error
|
if ( (empState<10) || (empState>12)) // error
|
||||||
{
|
{
|
||||||
collActiv=13;
|
//collActiv=13;
|
||||||
hwapi_paymentStarted=90;
|
//hwapi_paymentStarted=90;
|
||||||
qCritical() << "emitting signal payStopByError" << empState;
|
//qCritical() << "emitting signal payStopByError" << empState;
|
||||||
emit runProc_payStopByError();
|
//emit runProc_payStopByError();
|
||||||
} */
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,7 +284,8 @@ uint8_t T_runProc::cash_paymentProcessing(void)
|
|||||||
{
|
{
|
||||||
// coin collection finished, but coins kept until printing done
|
// coin collection finished, but coins kept until printing done
|
||||||
collActiv=2;
|
collActiv=2;
|
||||||
if (payInProg==6) // coins encashed
|
//if (payInProg==6) // coins encashed
|
||||||
|
if (payInProg==7) // coins encashed since nov2023
|
||||||
{
|
{
|
||||||
collActiv=6;
|
collActiv=6;
|
||||||
hwapi_paymentStarted++;
|
hwapi_paymentStarted++;
|
||||||
@@ -272,7 +293,8 @@ uint8_t T_runProc::cash_paymentProcessing(void)
|
|||||||
emit runProc_coinProcessJustStopped();
|
emit runProc_coinProcessJustStopped();
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if (payInProg==7) // coins returned, printing failed
|
//if (payInProg==7) // coins returned, printing failed
|
||||||
|
if (payInProg==0) // coins returned, printing failed since nov2023
|
||||||
{
|
{
|
||||||
collActiv=7;
|
collActiv=7;
|
||||||
hwapi_paymentStarted++;
|
hwapi_paymentStarted++;
|
||||||
|
@@ -1984,7 +1984,7 @@ void epi_iniVRstorage(void)
|
|||||||
void gpi_storeVaultRecord(uint8_t blkNr, uint8_t *data )
|
void gpi_storeVaultRecord(uint8_t blkNr, uint8_t *data )
|
||||||
{
|
{
|
||||||
uint16_t start=blkNr, ii;
|
uint16_t start=blkNr, ii;
|
||||||
//qDebug()<<"storing vault data "<<blkNr;
|
qDebug()<<"storing vault data "<<blkNr;
|
||||||
SharedMem::write()->store_gotNrBlocksOfVaultRec |= (1<<start); // setze pro Block ein bit, wir brauchen block 0...5
|
SharedMem::write()->store_gotNrBlocksOfVaultRec |= (1<<start); // setze pro Block ein bit, wir brauchen block 0...5
|
||||||
// also muss store_gotNrBlocksOfVaultRec auf 0x1F stehen
|
// also muss store_gotNrBlocksOfVaultRec auf 0x1F stehen
|
||||||
start<<=6; // *64
|
start<<=6; // *64
|
||||||
@@ -2054,13 +2054,50 @@ uint16_t epi_getNrOfCoinsInCashBox(void)
|
|||||||
|
|
||||||
void gpi_storeDcDataValid(bool isVal)
|
void gpi_storeDcDataValid(bool isVal)
|
||||||
{
|
{
|
||||||
SharedMem::write()->store_DcDataAreValid = isVal;
|
bool now=SharedMem::read()->store_DcDataAreValid;
|
||||||
|
if (isVal != now)
|
||||||
|
{
|
||||||
|
SharedMem::write()->store_DcDataAreValid = isVal;
|
||||||
|
#ifdef THIS_IS_CA_MASTER
|
||||||
|
qDebug()<<"master lib sets DcDataValid to "<<isVal;
|
||||||
|
#else
|
||||||
|
qDebug()<<"slave lib sets DcDataValid to "<<isVal;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void epi_setDcDataValid(void)
|
||||||
|
{
|
||||||
|
bool now=SharedMem::read()->store_DcDataAreValid;
|
||||||
|
if (now==false)
|
||||||
|
{
|
||||||
|
SharedMem::write()->store_DcDataAreValid = true;
|
||||||
|
#ifdef THIS_IS_CA_MASTER
|
||||||
|
qDebug()<<"master lib SET DcDataValid";
|
||||||
|
#else
|
||||||
|
qDebug()<<"slave lib SET DcDataValid";
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void epi_resetDcDataValid(void)
|
||||||
|
{
|
||||||
|
bool now=SharedMem::read()->store_DcDataAreValid;
|
||||||
|
if (now==true)
|
||||||
|
{
|
||||||
|
SharedMem::write()->store_DcDataAreValid = false;
|
||||||
|
#ifdef THIS_IS_CA_MASTER
|
||||||
|
qDebug()<<"master lib RESET DcDataValid";
|
||||||
|
#else
|
||||||
|
qDebug()<<"slave lib RESET DcDataValid";
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool epi_areDcDataValid()
|
bool epi_areDcDataValid()
|
||||||
{
|
{
|
||||||
return SharedMem::read()->store_DcDataAreValid;
|
return SharedMem::read()->store_DcDataAreValid;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ....................................................................................
|
// ....................................................................................
|
||||||
|
Reference in New Issue
Block a user