Compare commits
3 Commits
download-d
...
coin-attac
Author | SHA1 | Date | |
---|---|---|---|
9cac6a6461 | |||
aa10d3b275 | |||
790c2fd031 |
@@ -1384,9 +1384,7 @@ signals:
|
||||
void hwapi_doorCBinAndAllDoorsClosed(void) const override;
|
||||
void hwapi_doorAllDoorsClosed(void) const override;
|
||||
|
||||
|
||||
|
||||
|
||||
void hwapi_coinAttached() const override;
|
||||
|
||||
private slots:
|
||||
//void hwapi_slotPrintFinished_OK(void);
|
||||
@@ -1414,8 +1412,7 @@ signals:
|
||||
void sub_slotCoin15(void);
|
||||
void sub_slotCoin16(void);
|
||||
|
||||
|
||||
|
||||
void coinAttached();
|
||||
|
||||
};
|
||||
|
||||
|
@@ -2390,6 +2390,7 @@ signals:
|
||||
virtual void hwapi_doorCBinAndAllDoorsClosed(void) const=0;
|
||||
virtual void hwapi_doorAllDoorsClosed(void) const=0;
|
||||
|
||||
virtual void hwapi_coinAttached() const = 0;
|
||||
|
||||
// NOTE: declaring a "pure virtual" "signal" should be an error and thus not valid.
|
||||
/* GH Version, bringt Fehler
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#include <QDebug>
|
||||
#include "datIf.h"
|
||||
#include <QSharedMemory>
|
||||
#include <atomic>
|
||||
#include "sendWRcmd.h"
|
||||
#include "controlBus.h"
|
||||
#include "storeINdata.h"
|
||||
@@ -35,6 +36,10 @@ class T_runProc : public QObject
|
||||
|
||||
void restoreDeviceParameter(struct T_devices *deviceSettings);
|
||||
|
||||
#ifndef THIS_IS_CA_MASTER
|
||||
std::atomic_bool m_coinAttached{false};
|
||||
#endif
|
||||
|
||||
private slots:
|
||||
void runProc_slotProcess(void);
|
||||
bool bl_performComplStart(void);
|
||||
@@ -80,6 +85,7 @@ signals:
|
||||
void runProc_doorCBinAndAllDoorsClosed(void);
|
||||
void runProc_doorAllDoorsClosed(void);
|
||||
|
||||
void runProc_coinAttached();
|
||||
};
|
||||
|
||||
|
||||
|
@@ -128,8 +128,7 @@ hwapi::hwapi(QWidget *parent) : QObject(parent)
|
||||
connect(runProcess, SIGNAL(runProc_doorCoinBoxInserted()), this, SLOT(sub_slotCoin14())); // hwapi_doorCoinBoxInserted()));
|
||||
connect(runProcess, SIGNAL(runProc_doorCBinAndAllDoorsClosed()), this, SLOT(sub_slotCoin15())); // hwapi_doorCBinAndAllDoorsClosed()));
|
||||
connect(runProcess, SIGNAL(runProc_doorAllDoorsClosed()), this, SLOT(sub_slotCoin16())); // hwapi_doorAllDoorsClosed()));
|
||||
|
||||
|
||||
connect(runProcess, SIGNAL(runProc_coinAttached()), this, SLOT(coinAttached()));
|
||||
}
|
||||
|
||||
void hwapi::hwapi_slotPayProc(void)
|
||||
@@ -227,6 +226,9 @@ void hwapi::sub_slotCoin16(void)
|
||||
emit hwapi_doorAllDoorsClosed();
|
||||
}
|
||||
|
||||
void hwapi::coinAttached() {
|
||||
emit hwapi_coinAttached();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
@@ -48,6 +48,16 @@ T_runProc::T_runProc()
|
||||
void T_runProc::runProc_slotProcess(void)
|
||||
{
|
||||
#ifndef THIS_IS_CA_MASTER
|
||||
bool const coinAttached = epi_getDI_CoinAttach();
|
||||
// exchange: (atomically) replaces the underlying value of m_coinAttached
|
||||
// with the value of coinAttached, returns the value of m_coinAttached
|
||||
// before the call
|
||||
if (m_coinAttached.exchange(coinAttached) == false) {
|
||||
if (coinAttached) {
|
||||
// old value was false, and new value is true
|
||||
emit runProc_coinAttached();
|
||||
}
|
||||
}
|
||||
cash_paymentProcessing();
|
||||
doors_supervise();
|
||||
bl_performComplStart(); // neu 1.12.23
|
||||
|
Reference in New Issue
Block a user