Index: sources/MessageGlobals.h =================================================================== diff -u -r1ac0482d2e0a0baf9d9d7eb7f1223458bd3eced5 -raf84a44034a877134a53b6b48b016d409f843380 --- sources/MessageGlobals.h (.../MessageGlobals.h) (revision 1ac0482d2e0a0baf9d9d7eb7f1223458bd3eced5) +++ sources/MessageGlobals.h (.../MessageGlobals.h) (revision af84a44034a877134a53b6b48b016d409f843380) @@ -123,6 +123,9 @@ ID_NONE = 0x0000, ID_TX_TIME_BC = 0x0D00, ID_HD_TX_STATES_BC = 0x0F00, + ID_USER_TX_TIME_CHANGES_RQST = 0x1600, + ID_HD_TX_PARAMS_RANGES_DATA = 0x1A00, + ID_USER_TX_TIME_CHANGES_RESP = 0x1B00, ID_HD_OP_MODE = 0x2500, ID_UI_TX_PARAMS_RQST = 0x3500, ID_HD_NEW_PARAMS_RESP = 0x3600, Index: sources/StateController.cpp =================================================================== diff -u -r8dec5fecad6d0be26c22a427ed60c08a9753563a -raf84a44034a877134a53b6b48b016d409f843380 --- sources/StateController.cpp (.../StateController.cpp) (revision 8dec5fecad6d0be26c22a427ed60c08a9753563a) +++ sources/StateController.cpp (.../StateController.cpp) (revision af84a44034a877134a53b6b48b016d409f843380) @@ -100,7 +100,6 @@ int resultIndex = 0; Types::U32 resultParam; GetValue(msg[1].toByteArray(), resultIndex, resultParam); - qDebug() << "Sample reulsts" << resultParam.value; if ( resultParam.value == 1 ) { _dryDemoCurrentCmd = CMD_CONSUMABLES; } @@ -154,8 +153,29 @@ _hasUserConfirmedToProceed = true; break; + case ID_USER_TX_TIME_CHANGES_RQST: { + int IDIndex = 0; + Types::U32 txDurMin; + GetValue(msg[1].toByteArray(), IDIndex, txDurMin); + + qDebug() << "New treat time" << txDurMin.value; + + _prescribedTreatmentTimeS *= MINUTES_TO_SECONDS; + + msgBack.clear(); + msgBack.append(static_cast(ID_USER_TX_TIME_CHANGES_RESP)); + msgBack.append(Can_Id::eChlid_HD_UI); + msgBack.append(1); + msgBack.append(0); + msgBack.append(txDurMin.value); + msgBack.append(DEFAULT_UF_VOLUME_L); + emit _ApplicationController.didActionTransmit(msgBack); + } + break; + case ID_NONE: case ID_TX_TIME_BC: + case ID_HD_TX_PARAMS_RANGES_DATA: case ID_HD_TX_STATES_BC: case ID_HD_OP_MODE: case ID_FILTER_FLUSH_TIME_BC: @@ -167,6 +187,7 @@ case ID_HD_PRIMING_TIME_BC: case ID_HD_SET_UF_VOLUME_RESP: case ID_HD_PATINET_CONNECTION_CONF_RESP: + case ID_USER_TX_TIME_CHANGES_RESP: // Do nothing break; } @@ -220,18 +241,19 @@ 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; + if ((_currentCounterValue < 0) && (_prescribedTreatmentTimeS < 0)) { + _prescribedTreatmentTimeS = _dryDemoCmds[_dryDemoCurrentCmd][_index][TIME_PRESCRIBED_S_INDEX].toUInt(); + quint32 elapsedTimeS = _dryDemoCmds[_dryDemoCurrentCmd][_index][TIME_ELAPSED_S_INDEX].toUInt(); + _currentCounterValue = _prescribedTreatmentTimeS - 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; + msg[TIME_PRESCRIBED_S_INDEX - RESP_MSG_START_INDEX] = _prescribedTreatmentTimeS; + msg[TIME_REMAINING_S_INDEX - RESP_MSG_START_INDEX] = _currentCounterValue; qDebug() << "Counters Tx" << _currentCounterValue << _dryDemoCmds[_dryDemoCurrentCmd][_index]; emit _ApplicationController.didActionTransmit(msg); break; @@ -250,8 +272,10 @@ } } else { - emit _ApplicationController.didActionTransmit(_dryDemoCmds[_dryDemoCurrentCmd][_index].mid(RESP_MSG_START_INDEX)); - _broadcastMsgCount++; + if (_broadcastMsgCount <= NUM_OF_COUNTS_TO_BC_MSG) { + emit _ApplicationController.didActionTransmit(_dryDemoCmds[_dryDemoCurrentCmd][_index].mid(RESP_MSG_START_INDEX)); + _broadcastMsgCount++; + } bool isWaitNeeded = _dryDemoCmds[_dryDemoCurrentCmd][_index][IS_WAIT_NEEDED_INDEX].toBool(); @@ -284,7 +308,7 @@ QVariantList temp; temp.append("Transition_2_Tx_Parms"); temp.append(false); // wait for a trigger - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_TPAR); @@ -294,35 +318,35 @@ temp.append("Transition_2_Water_Sample"); temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_PRET); temp.append(0); _dryDemoCmds[CMD_WATER_SAMPLE].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); 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); temp.append(0); temp.append(0); _dryDemoCmds[CMD_WATER_SAMPLE].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_PRE_TX_TIMERS)); //(true); // this is the timer + temp.append(static_cast(COUNTER_PRE_TX_TIMERS)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_FILTER_FLUSH_TIME_BC)); temp.append(Can_Id::eChlid_DG_Sync); temp.append(DEFAULT_TIMEOUT_S); temp.append(DEFAULT_TIMEOUT_S); _dryDemoCmds[CMD_WATER_SAMPLE].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(0); temp.append(1); temp.append(0); temp.append(0); temp.append(0); @@ -333,56 +357,56 @@ temp.append("Transition_2_Consumables"); temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_PRET); temp.append(0); _dryDemoCmds[CMD_CONSUMABLES].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(true); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_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); temp.append(0); _dryDemoCmds[CMD_CONSUMABLES].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(1); temp.append(0); 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_CONSUMABLES].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(1); temp.append(0); temp.append(2); 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_CONSUMABLES].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(1); temp.append(0); temp.append(3); 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_CONSUMABLES].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_DISPOSABLES)); // auto transition + temp.append(static_cast(CMD_DISPOSABLES)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(1); temp.append(0); temp.append(4); temp.append(0); temp.append(0); @@ -393,45 +417,45 @@ temp.append("Transition_2_Disposables"); temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_PRET); temp.append(0); _dryDemoCmds[CMD_DISPOSABLES].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(2); temp.append(0); temp.append(0); 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); _dryDemoCmds[CMD_DISPOSABLES].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_PRE_TX_TIMERS)); //(true); // this is the timer + temp.append(static_cast(COUNTER_PRE_TX_TIMERS)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_SYS_SELF_TEST_TIME_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(DEFAULT_TIMEOUT_S); temp.append(DEFAULT_TIMEOUT_S); _dryDemoCmds[CMD_DISPOSABLES].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); // wait for the user - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(3); 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); temp.append(0); _dryDemoCmds[CMD_DISPOSABLES].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(true); // wait for the user - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(3); temp.append(0); temp.append(0); temp.append(0); temp.append(0); @@ -442,334 +466,334 @@ temp.append("Transition_2_Sys_Prime"); temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_PRET); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); 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); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_PRE_TX_TIMERS)); //(true); // this is the timer + temp.append(static_cast(COUNTER_PRE_TX_TIMERS)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_DRY_SELF_TEST_TIME_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(DEFAULT_TIMEOUT_S); temp.append(DEFAULT_TIMEOUT_S); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(1); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(2); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(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(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(3); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(6); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(7); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(8); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(9); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(10); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(11); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(12); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(13); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(14); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(15); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(16); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); 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); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_PRE_TX_TIMERS)); //(true); // this is the timer + temp.append(static_cast(COUNTER_PRE_TX_TIMERS)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_PRIMING_TIME_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(DEFAULT_TIMEOUT_S); temp.append(DEFAULT_TIMEOUT_S); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(1); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(2); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(3); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(4); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(6); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(7); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(8); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(9); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(10); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(11); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(5); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(12); temp.append(0); temp.append(0); temp.append(0); temp.append(0); temp.append(0); _dryDemoCmds[CMD_SYSTEM_PRIME].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(true); // wait - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(6); temp.append(0); temp.append(0); temp.append(0); temp.append(0); @@ -780,16 +804,16 @@ temp.append("Transition_2_BP_HR"); temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_PRET); temp.append(0); _dryDemoCmds[CMD_BP_HR].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); // wait - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(7); temp.append(0); temp.append(0); temp.append(0); temp.append(0); @@ -800,16 +824,16 @@ temp.append("Transition_2_Ultrafiltraion"); temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_PRET); temp.append(0); _dryDemoCmds[CMD_ULTRAFILTRATION].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); // wait - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(7); temp.append(0); temp.append(0); temp.append(0); temp.append(0); @@ -820,16 +844,16 @@ temp.append("Transition_2_Patient_Connection"); temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_PRET); temp.append(0); _dryDemoCmds[CMD_CONNECTION].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(true); // wait - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(7); temp.append(0); temp.append(0); temp.append(0); temp.append(0); @@ -840,55 +864,67 @@ temp.append("Transition_2_Start_Tx"); temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_PRET); temp.append(0); _dryDemoCmds[CMD_START_TX].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(true); // wait - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_PRE_TX_STATES_BC)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(7); 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(3); temp.append(0); temp.append(0); _dryDemoCmds[CMD_START_TX].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); // 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(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_TREA); temp.append(0); _dryDemoCmds[CMD_START_TX].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); //(false); // this is the timer + // NOTE: Tx param ranges are broadcast in firmware but it is sent here only once + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); // wait - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(ID_HD_TX_PARAMS_RANGES_DATA)); + temp.append(Can_Id::eChlid_HD_UI); + temp.append(0); temp.append(DEFAULT_TX_PRESCRIBED_DUR_S / 60); + temp.append(0.0); temp.append(DEFAULT_UF_VOLUME_L); + temp.append(100); temp.append(600); + _dryDemoCmds[CMD_START_TX].append(temp); + temp.clear(); + + temp.append(static_cast(COUNTER_NONE)); // 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(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); // wait - temp.append(static_cast(CMD_NONE)); // auto transition + 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(static_cast(COUNTER_TX_TIMER)); // this is the timer temp.append(false); // wait - temp.append(static_cast(CMD_NONE)); // auto transition + 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); @@ -898,28 +934,28 @@ temp.clear(); temp.append("Transition_2_End_Tx"); - temp.append(static_cast(COUNTER_NONE)); // 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(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_TREA); temp.append(0); _dryDemoCmds[CMD_END_TX].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); // wait - temp.append(static_cast(CMD_NONE)); // auto transition + 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_END_TX].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(true); // wait - temp.append(static_cast(CMD_NONE)); // auto transition + 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(6); temp.append(0); temp.append(0); temp.append(0); temp.append(0); @@ -930,16 +966,16 @@ temp.append("Transition_2_Disinfect"); temp.append(false); - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_STAN); temp.append(0); _dryDemoCmds[CMD_DISINFECTION].append(temp); temp.clear(); - temp.append(static_cast(COUNTER_NONE)); // this is the timer + temp.append(static_cast(COUNTER_NONE)); // this is the timer temp.append(false); // wait - temp.append(static_cast(CMD_NONE)); // auto transition + temp.append(static_cast(CMD_NONE)); // auto transition temp.append(static_cast(ID_HD_OP_MODE)); temp.append(Can_Id::eChlid_HD_Sync); temp.append(MODE_STAN); @@ -967,6 +1003,7 @@ _timerBroadcastCount = 0; _hasUserConfirmedToProceed = false; _currentCounterValue = COUNTER_VAR_DEFAULT_VALUE; + _prescribedTreatmentTimeS = PRESC_TIME_DEFAULT_VALUE; } // ----------- State transition methods ---------------- // Index: sources/StateController.h =================================================================== diff -u -r8dec5fecad6d0be26c22a427ed60c08a9753563a -raf84a44034a877134a53b6b48b016d409f843380 --- sources/StateController.h (.../StateController.h) (revision 8dec5fecad6d0be26c22a427ed60c08a9753563a) +++ sources/StateController.h (.../StateController.h) (revision af84a44034a877134a53b6b48b016d409f843380) @@ -31,6 +31,9 @@ // General defines #define UI_MSG_DD_STATUS_INDEX 4 #define UI_MSG_BB_PAYLOAD_ID 0x63 + #define COUNTER_VAR_DEFAULT_VALUE -1 + #define PRESC_TIME_DEFAULT_VALUE -1 + #define MINUTES_TO_SECONDS 60 // Pre treatment defines #define DEFAULT_TIMEOUT_S 10 @@ -40,7 +43,6 @@ #define IS_WAIT_NEEDED_INDEX 1 #define NEXT_AUTO_TRANSITION_INDEX 2 #define COUNT_DOWN_TIMER_INDEX 6 - #define COUNTER_VAR_DEFAULT_VALUE -1 // Timer event defines #define QOBJECT_TIMER_TIMEOUT_MS 100 @@ -49,11 +51,12 @@ #define NUM_OF_COUNTS_TO_BC_MSG 3 // Treatment defines - #define DEFAULT_TX_PRESCRIBED_DUR_S ((4 * 60) + 30) * 60 - #define DEFAULT_TX_ELAPSED_TIME_S (2 * 60) * 60 + #define DEFAULT_TX_PRESCRIBED_DUR_S ((4 * 60) + 30) * MINUTES_TO_SECONDS + #define DEFAULT_TX_ELAPSED_TIME_S (2 * 60) * MINUTES_TO_SECONDS #define TIME_PRESCRIBED_S_INDEX 5 #define TIME_ELAPSED_S_INDEX 6 #define TIME_REMAINING_S_INDEX 7 + #define DEFAULT_UF_VOLUME_L 2.0 enum User_Command_ID { CMD_NONE = -1, @@ -84,6 +87,7 @@ quint16 _timerBroadcastCount; bool _hasUserConfirmedToProceed; int _currentCounterValue; + int _prescribedTreatmentTimeS; User_Command_ID _dryDemoCurrentCmd; drydemoXMLstates _dryDemo;