forked from GerhardHoffmann/DCLibraries
		
	Add atomic<bool> variable m_coinAttached to check for state change:
send signal runProc_coinAttached only if state changes from false true.
This commit is contained in:
		@@ -48,8 +48,12 @@ T_runProc::T_runProc()
 | 
			
		||||
void T_runProc::runProc_slotProcess(void)
 | 
			
		||||
{
 | 
			
		||||
#ifndef THIS_IS_CA_MASTER
 | 
			
		||||
    if (epi_getDI_CoinAttach()) {
 | 
			
		||||
        emit runProc_coinAttached();
 | 
			
		||||
    bool const coinAttached = epi_getDI_CoinAttach();
 | 
			
		||||
    if (m_coinAttached.exchange(coinAttached) == false) {
 | 
			
		||||
        if (coinAttached) {
 | 
			
		||||
            // old value was false, and new value is true
 | 
			
		||||
            emit runProc_coinAttached();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    cash_paymentProcessing();
 | 
			
		||||
    doors_supervise();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user