Index: sources/StateController.cpp =================================================================== diff -u -r4962db1d199fff532618c755301e089c99399c53 -r1ac0482d2e0a0baf9d9d7eb7f1223458bd3eced5 --- sources/StateController.cpp (.../StateController.cpp) (revision 4962db1d199fff532618c755301e089c99399c53) +++ sources/StateController.cpp (.../StateController.cpp) (revision 1ac0482d2e0a0baf9d9d7eb7f1223458bd3eced5) @@ -152,6 +152,7 @@ break; case ID_NONE: + case ID_TX_TIME_BC: case ID_HD_TX_STATES_BC: case ID_HD_OP_MODE: case ID_FILTER_FLUSH_TIME_BC: @@ -181,22 +182,61 @@ if ((listSize > 1) && (_index < listSize)) { - if (_dryDemoCmds[_dryDemoCurrentCmd][_index][IS_TIMER_INDEX].toBool()) { + int counterType = _dryDemoCmds[_dryDemoCurrentCmd][_index][IS_TIMER_INDEX].toInt(); + Counter_Type counterTypeEnum = static_cast(counterType); - if (_currentCounterValue < 0) { - _currentCounterValue = _dryDemoCmds[_dryDemoCurrentCmd][_index][COUNT_DOWN_TIMER_INDEX].toUInt(); - } + qDebug() << "Counter Type" << _dryDemoCurrentCmd << _index << counterTypeEnum; + //if (_dryDemoCmds[_dryDemoCurrentCmd][_index][IS_TIMER_INDEX].toBool()) { + if (counterTypeEnum != COUNTER_NONE) { + if (_timerBroadcastCount >= NUM_OF_COUNTS_TIMER_BC_EMIT) { - _currentCounterValue--; - _timerBroadcastCount = 0; - QVariant tempVar = _dryDemoCmds[_dryDemoCurrentCmd][_index].mid(RESP_MSG_START_INDEX); - QVariantList msg = tempVar.toList(); - msg[COUNT_DOWN_TIMER_INDEX - RESP_MSG_START_INDEX] = _currentCounterValue; - qDebug() << "Counters" << msg << _currentCounterValue << _dryDemoCmds[_dryDemoCurrentCmd][_index][COUNT_DOWN_TIMER_INDEX].toUInt(); - emit _ApplicationController.didActionTransmit(msg); + QVariant tempVar; + QVariantList msg; + switch ( counterTypeEnum) + { + case COUNTER_NONE: + // Do nothing + break; + + case COUNTER_PRE_TX_TIMERS: + if (_currentCounterValue < 0) { + _currentCounterValue = _dryDemoCmds[_dryDemoCurrentCmd][_index][COUNT_DOWN_TIMER_INDEX].toUInt(); + } + + _currentCounterValue--; + _timerBroadcastCount = 0; + + tempVar = _dryDemoCmds[_dryDemoCurrentCmd][_index].mid(RESP_MSG_START_INDEX); + msg = tempVar.toList(); + msg[COUNT_DOWN_TIMER_INDEX - RESP_MSG_START_INDEX] = _currentCounterValue; + qDebug() << "Counters Pre Tx" << _currentCounterValue << _dryDemoCmds[_dryDemoCurrentCmd][_index][COUNT_DOWN_TIMER_INDEX].toUInt(); + emit _ApplicationController.didActionTransmit(msg); + break; + + case COUNTER_TX_TIMER: + if (_currentCounterValue < 0) { + quint32 prescribedTimeS = _dryDemoCmds[_dryDemoCurrentCmd][_index][TIME_PRESCRIBED_S_INDEX].toUInt(); + quint32 elapsedTimeS = _dryDemoCmds[_dryDemoCurrentCmd][_index][TIME_ELAPSED_S_INDEX].toUInt(); + _currentCounterValue = prescribedTimeS - elapsedTimeS; + } + + _currentCounterValue--; + _timerBroadcastCount = 0; + + tempVar = _dryDemoCmds[_dryDemoCurrentCmd][_index].mid(RESP_MSG_START_INDEX); + msg = tempVar.toList(); + msg[TIME_REMAINING_S_INDEX - RESP_MSG_START_INDEX] = _currentCounterValue; + qDebug() << "Counters Tx" << _currentCounterValue << _dryDemoCmds[_dryDemoCurrentCmd][_index]; + emit _ApplicationController.didActionTransmit(msg); + break; + + case COUNTER_RINSEBACK_TIMER: + break; + } + if (_currentCounterValue == 0) { _index++; _currentCounterValue = COUNTER_VAR_DEFAULT_VALUE; @@ -258,7 +298,7 @@ temp.append(0); _dryDemoCmds[CMD_WATER_SAMPLE].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -268,7 +308,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_WATER_SAMPLE].append(temp); temp.clear(); - temp.append(true); // this is the timer + temp.append(static_cast(COUNTER_PRE_TX_TIMERS)); //(true); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_FILTER_FLUSH_TIME_BC)); @@ -277,7 +317,7 @@ temp.append(DEFAULT_TIMEOUT_S); _dryDemoCmds[CMD_WATER_SAMPLE].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -297,7 +337,7 @@ temp.append(0); _dryDemoCmds[CMD_CONSUMABLES].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(true); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -307,7 +347,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_CONSUMABLES].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -317,7 +357,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_CONSUMABLES].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -327,7 +367,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_CONSUMABLES].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -337,7 +377,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_CONSUMABLES].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_DISPOSABLES)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -357,7 +397,7 @@ temp.append(0); _dryDemoCmds[CMD_DISPOSABLES].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -367,7 +407,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_DISPOSABLES].append(temp); temp.clear(); - temp.append(true); // this is the timer + temp.append(static_cast(COUNTER_PRE_TX_TIMERS)); //(true); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_SYS_SELF_TEST_TIME_BC)); @@ -376,7 +416,7 @@ temp.append(DEFAULT_TIMEOUT_S); _dryDemoCmds[CMD_DISPOSABLES].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); // wait for the user temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -386,7 +426,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_DISPOSABLES].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(true); // wait for the user temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -406,7 +446,7 @@ temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -416,7 +456,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(true); // this is the timer + temp.append(static_cast(COUNTER_PRE_TX_TIMERS)); //(true); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_DRY_SELF_TEST_TIME_BC)); @@ -425,7 +465,7 @@ temp.append(DEFAULT_TIMEOUT_S); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -435,7 +475,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -445,7 +485,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -455,7 +495,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -465,7 +505,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -475,7 +515,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -485,7 +525,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -495,7 +535,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -505,7 +545,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -515,7 +555,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -525,7 +565,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -535,7 +575,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -545,7 +585,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -555,7 +595,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -565,7 +605,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -575,7 +615,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -585,7 +625,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -595,7 +635,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(true); // this is the timer + temp.append(static_cast(COUNTER_PRE_TX_TIMERS)); //(true); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_PRIMING_TIME_BC)); @@ -604,7 +644,7 @@ temp.append(DEFAULT_TIMEOUT_S); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -614,7 +654,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -624,7 +664,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -634,7 +674,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -644,7 +684,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -654,7 +694,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -664,7 +704,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -674,7 +714,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -684,7 +724,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -694,7 +734,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -704,7 +744,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -714,7 +754,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -724,7 +764,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(true); // wait temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -744,7 +784,7 @@ temp.append(0); _dryDemoCmds[CMD_BP_HR].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); // wait temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -764,7 +804,7 @@ temp.append(0); _dryDemoCmds[CMD_CONNECTION].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(true); // wait temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -784,7 +824,7 @@ temp.append(0); _dryDemoCmds[CMD_START_TX].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(true); // wait temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); @@ -794,7 +834,7 @@ temp.append(0); temp.append(0); _dryDemoCmds[CMD_START_TX].append(temp); temp.clear(); - temp.append(0); // Transition to Tx. This is empty because there is no event + temp.append(static_cast(COUNTER_NONE)); // Transition to Tx. This is empty because there is no event temp.append(false); temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); @@ -803,16 +843,35 @@ temp.append(0); _dryDemoCmds[CMD_START_TX].append(temp); temp.clear(); - temp.append(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer temp.append(false); // wait temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); + temp.append(1); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); + temp.append(0); + _dryDemoCmds[CMD_START_TX].append(temp); + temp.clear(); + temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(false); // wait + temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(ID_HD_TX_STATES_BC)); + temp.append(Can_Id::eChlid_HD_Sync); + temp.append(2); temp.append(1); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_START_TX].append(temp); temp.clear(); + temp.append(static_cast(COUNTER_TX_TIMER)); //(false); // this is the timer + temp.append(false); // wait + temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(ID_TX_TIME_BC)); + temp.append(Can_Id::eChlid_HD_Sync); + temp.append(DEFAULT_TX_PRESCRIBED_DUR_S); + temp.append(DEFAULT_TX_ELAPSED_TIME_S); + temp.append(DEFAULT_TX_PRESCRIBED_DUR_S - DEFAULT_TX_ELAPSED_TIME_S); + _dryDemoCmds[CMD_START_TX].append(temp); } void StateController::transitionApplicationToStandBy()