diff --git a/DataSources/AtcaIop/AtcaIopADC.cpp b/DataSources/AtcaIop/AtcaIopADC.cpp index da2d4a3..f56844e 100644 --- a/DataSources/AtcaIop/AtcaIopADC.cpp +++ b/DataSources/AtcaIop/AtcaIopADC.cpp @@ -40,7 +40,7 @@ #include "AtcaIopADC.h" #include "atca-v6-iop-ioctl.h" -#define DEBUG_POLL 1 +#define DEBUG_POLL 32768 /*---------------------------------------------------------------------------*/ /* Static definitions */ /*---------------------------------------------------------------------------*/ @@ -660,7 +660,7 @@ ErrorManagement::ErrorType AtcaIopADC::Execute(ExecutionInfo& info) { oldestBufferIdx = GetOldestBufferIdx(); float32 totalSleepTime = static_cast(static_cast(deltaTicks) * HighResolutionTimer::Period()); #ifdef DEBUG_POLL - if((execCounter++)%4096 == 0) { + if((execCounter++)%DEBUG_POLL == 0) { REPORT_ERROR(ErrorManagement::Information, "Executor sleepTime: %f pollTimout: %d", totalSleepTime, pollTimout); } #endif diff --git a/DataSources/AtcaIop/AtcaIopConfigEoWo.cpp b/DataSources/AtcaIop/AtcaIopConfigEoWo.cpp index 3976ae4..0430d34 100644 --- a/DataSources/AtcaIop/AtcaIopConfigEoWo.cpp +++ b/DataSources/AtcaIop/AtcaIopConfigEoWo.cpp @@ -64,6 +64,7 @@ namespace MARTe { //channelsMemory = NULL_PTR(float32 *); eoValues = NULL_PTR(int32 *); woValues = NULL_PTR(float32 *); + eoWriteFlag = false; filter = ReferenceT(GlobalObjectsDatabase::Instance()->GetStandardHeap()); filter->SetDestination(this); @@ -205,6 +206,11 @@ namespace MARTe { /*lint -e{715} [MISRA C++ Rule 0-1-11], [MISRA C++ Rule 0-1-12]. Justification: the counter and the timer are always reset irrespectively of the states being changed.*/ bool AtcaIopConfigEoWo::PrepareNextState(const char8* const currentStateName, const char8* const nextStateName) { REPORT_ERROR(ErrorManagement::Information, " EoWo currentStateName %s, nextStateName %s", currentStateName, nextStateName); + StreamString nSName = nextStateName; + if (nSName == "Run") { + eoWriteFlag = true; + } + //if (currentStateName == "Idle") { // REPORT_ERROR(ErrorManagement::Information, "OffState"); //} @@ -371,6 +377,10 @@ namespace MARTe { REPORT_ERROR(ErrorManagement::Information, "Synchronise eo0:%d wo0%0.3f", eoValues[0], woValues[0]); } #endif + if (eoWriteFlag) { + eoWriteFlag = false; + REPORT_ERROR(ErrorManagement::Information, "Write eo0:%d wo0%0.3f", eoValues[0], woValues[0]); + } //write(boardFileDescriptor, &w, 4); /* if (channelsMemory != NULL_PTR(float32 *)) { diff --git a/DataSources/AtcaIop/AtcaIopConfigEoWo.h b/DataSources/AtcaIop/AtcaIopConfigEoWo.h index 6c04a30..92686d2 100644 --- a/DataSources/AtcaIop/AtcaIopConfigEoWo.h +++ b/DataSources/AtcaIop/AtcaIopConfigEoWo.h @@ -213,6 +213,8 @@ namespace MARTe { */ float32 *woValues; + bool eoWriteFlag; + /** * The signal memory */