| 
						
						
							
								
							
						
						
					 | 
					@ -21,7 +21,9 @@ typedef std::function<void(Inverter<> *)> alarmListenerType; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					class Communication : public CommQueue<> { | 
					 | 
					 | 
					class Communication : public CommQueue<> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public: | 
					 | 
					 | 
					    public: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Communication() : CommQueue() {} | 
					 | 
					 | 
					        Communication() | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            : CommQueue() | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        {} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ~Communication() {} | 
					 | 
					 | 
					        ~Communication() {} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -52,23 +54,29 @@ class Communication : public CommQueue<> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        void loop() { | 
					 | 
					 | 
					        void loop() { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            get([this](bool valid, QueueElement *q) { | 
					 | 
					 | 
					            if(States::RESET == mState) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                if(!valid) { | 
					 | 
					 | 
					                get([this](bool valid, QueueElement *q) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    if(mPrintSequenceDuration) { | 
					 | 
					 | 
					                    if(!valid) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        mPrintSequenceDuration = false; | 
					 | 
					 | 
					                        if(mPrintSequenceDuration) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        DPRINT(DBG_INFO, F("com loop duration: ")); | 
					 | 
					 | 
					                            mPrintSequenceDuration = false; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        DBGPRINT(String(millis() - mLastEmptyQueueMillis)); | 
					 | 
					 | 
					                            DPRINT(DBG_INFO, F("com loop duration: ")); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        DBGPRINTLN(F("ms")); | 
					 | 
					 | 
					                            DBGPRINT(String(millis() - mLastEmptyQueueMillis)); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        DBGPRINTLN(F("-----")); | 
					 | 
					 | 
					                            DBGPRINTLN(F("ms")); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            DBGPRINTLN(F("-----")); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            el.iv = nullptr; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        return; // empty
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    } | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    return; // empty
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                if(!mPrintSequenceDuration) // entry was added to the queue
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    mLastEmptyQueueMillis = millis(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                mPrintSequenceDuration = true; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                innerLoop(q); | 
					 | 
					 | 
					                    el = *q; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            }); | 
					 | 
					 | 
					                    if(!mPrintSequenceDuration) // entry was added to the queue
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        mLastEmptyQueueMillis = millis(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    mPrintSequenceDuration = true; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            if(nullptr != el.iv) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                innerLoop(&el); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private: | 
					 | 
					 | 
					    private: | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1035,6 +1043,7 @@ class Communication : public CommQueue<> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private: | 
					 | 
					 | 
					    private: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        States mState = States::RESET; | 
					 | 
					 | 
					        States mState = States::RESET; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        uint32_t *mTimestamp = nullptr; | 
					 | 
					 | 
					        uint32_t *mTimestamp = nullptr; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        QueueElement el; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        bool *mPrivacyMode = nullptr, *mSerialDebug = nullptr, *mPrintWholeTrace = nullptr; | 
					 | 
					 | 
					        bool *mPrivacyMode = nullptr, *mSerialDebug = nullptr, *mPrintWholeTrace = nullptr; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        TimeMonitor mWaitTime = TimeMonitor(0, true);  // start as expired (due to code in RESET state)
 | 
					 | 
					 | 
					        TimeMonitor mWaitTime = TimeMonitor(0, true);  // start as expired (due to code in RESET state)
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        std::array<frame_t, MAX_PAYLOAD_ENTRIES> mLocalBuf; | 
					 | 
					 | 
					        std::array<frame_t, MAX_PAYLOAD_ENTRIES> mLocalBuf; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |