Index: AlarmMapping.csv =================================================================== diff -u -r0f1aa395dfb46e006bdec10d0bb99f2ed27739bf -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- AlarmMapping.csv (.../AlarmMapping.csv) (revision 0f1aa395dfb46e006bdec10d0bb99f2ed27739bf) +++ AlarmMapping.csv (.../AlarmMapping.csv) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -88,19 +88,19 @@ 87,"DG heating invalid calibration record." 88,"DG concentrate pumps hall sensor out of range." 89,"HD BP occlusion sensor error." - 90,"This alarm ID is available for use." + 90,"DG load cells FPGA read error." 91,"HD No dialysate flow data receive in the last 3 seconds." 92,"DG conductivity sensor bad status." 93,"DG outlet primary conductivity out of range." - 94,"This alarm ID is available for use." - 95,"This alarm ID is available for use." + 94,"DG pressure out of range." + 95,"DG watchdog expired." 96,"Inlet water temperature in high range." 97,"Fill conductivity out of range." 98,"HD battery communication fault." 99,"HD syringe pump stall alarm." 100,"HD no cartridge self-test timeout." 101,"HD dry self-test timeout." - 102,"Real-time clock communication error." + 102,"DG heat disinfect temperature gradient out of range." 103,"HD non-volatile calibration group invalid record CRC." 104,"Air trap level sensors reporting illegal combination of air/fluid." 105,"DG non-volatile system group invalid record CRC." @@ -115,10 +115,10 @@ 114,"HD venous air bubble detector self-test failure." 115,"DG temperature sensor out of range." 116,"DG temperature sensor ADC out of range." - 117,"DG primary heater internal temperature out of range." - 118,"DG primary heater cold junction temperature out of range." - 119,"DG trimmer heater internal temperature out of range." - 120,"DG trimmer heater cold junction temperature out of range." + 117,"DG CAN message not acked." + 118,"DG RTC config error." + 119,"DG RTC battery low error." + 120,"HD pre-treatment mode wet self-test prime check failure." 121,"DG main primary heater voltage out of range." 122,"DG small primary heater voltage out of range." 123,"DG trimmer heater voltage out of range." @@ -144,10 +144,10 @@ 143,"DG dialysate temperature sensors out of range." 144,"DG software configuration record invalid CRC." 145,"Concentrate conductivity after adding acid out of range alarm." - 146,"Dialysate conductivity out of range." + 146,"DG RTC or timer accuracy failure." 147,"Wait for the DG to produce dialysate." 148,"Inlet water temperature too high." - 149,"Alarm ID available for use." + 149,"HD watchdog expired." 150,"Inlet water conductivity in high range." 151,"Inlet water conductivity in low range." 152,"Inlet water pressure in low range." @@ -159,8 +159,8 @@ 158,"Inlet water temperature is in the low range." 159,"Dialysate inlet pump failed flow vs motor speed check." 160,"Blood pump rotor speed too high." - 161,"This alarm ID is available for use." - 162,"This alarm ID is available for use." + 161,"DG comm too many bad CRCs." + 162,"DG FPGA clock speed check failure." 163,"HD sees primary load cell for reservoir 1 change too much too fast." 164,"HD sees primary load cell for reservoir 2 change too much too fast." 165,"HD in treatment rinseback operation timeout." @@ -199,8 +199,8 @@ 198,"DG heaters cold junction temperature out of range." 199,"DG heaters fault." 200,"DG thermistors/sensors temperature out of range." - 201,"This alarm ID is available for use." - 202,"Inlet water pressure fault." + 201,"HD pre-treatment mode wet self-test lc vs FMD failure." + 202,"HD pre-treatment mode dry pressure normal self-test failure." 203,"Pressure sensor fault." 204,"RO rejection ratio out of range." 205,"Conductivity sensor fault." @@ -229,8 +229,8 @@ 228,"HD time out on prime sub-mode purge air state." 229,"HD prime dialysate dialyzer time out alarm." 230,"HD prime dialysate bypass time out alarm." - 231,"HD pre-treatment mode dry self-tests failure." - 232,"HD pre-treatment mode wet self-tests failure." + 231,"HD pre-treatment mode dry pressure self-test failure." + 232,"HD pre-treatment mode wet self-test LC vs LC failure." 233,"RTC battery low." 234,"RTC (i.e read time) or RAM operations failure (read or write)." 235,"HD in treatment stopped sub-mode after rinseback completed (no escalation)." @@ -288,4 +288,5 @@ 287,"HD processor clock speed checks against FPGA clock failure." 288,"DG trimmer heater on with flow timeout." 289,"DG dialysate or concentrate caps not closed." - 290,"Total number of alarms." + 290,"DG flow too low while heater is on." + 291,"Total number of alarms." Index: cppcheck.err =================================================================== diff -u -r365071735de19125835b4b35a784e31eaae81bf9 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- cppcheck.err (.../cppcheck.err) (revision 365071735de19125835b4b35a784e31eaae81bf9) +++ cppcheck.err (.../cppcheck.err) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -1,6 +1,6 @@ -[sources/ApplicationPost.cpp:104] -> [sources/ApplicationPost.cpp:106]: (style) Condition '!ok' is always false -[sources/ApplicationPost.cpp:183] -> [sources/ApplicationPost.cpp:185]: (style) Condition '!ok' is always false -[sources/ApplicationPost.cpp:197] -> [sources/ApplicationPost.cpp:199]: (style) Condition '!ok' is always false +[sources/ApplicationPost.cpp:107] -> [sources/ApplicationPost.cpp:109]: (style) Condition '!ok' is always false +[sources/ApplicationPost.cpp:186] -> [sources/ApplicationPost.cpp:188]: (style) Condition '!ok' is always false +[sources/ApplicationPost.cpp:200] -> [sources/ApplicationPost.cpp:202]: (style) Condition '!ok' is always false [sources/MainTimer.cpp:69]: (style) The scope of the variable 'oH' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: void f(int x) { @@ -40,11 +40,12 @@ } } When you see this message it is always safe to reduce the variable scope 1 level. -[sources/cloudsync/CloudSyncController.cpp:485] -> [sources/cloudsync/CloudSyncController.cpp:493]: (style) Variable 'ok' is reassigned a value before the old one has been used. -[sources/cloudsync/CloudSyncController.cpp:632] -> [sources/cloudsync/CloudSyncController.cpp:633]: (style) Variable 'ok' is reassigned a value before the old one has been used. -[sources/cloudsync/CloudSyncController.cpp:659] -> [sources/cloudsync/CloudSyncController.cpp:660]: (style) Variable 'ok' is reassigned a value before the old one has been used. -[sources/cloudsync/CloudSyncController.cpp:725] -> [sources/cloudsync/CloudSyncController.cpp:726]: (style) Variable 'ok' is reassigned a value before the old one has been used. -[sources/cloudsync/CloudSyncController.cpp:814] -> [sources/cloudsync/CloudSyncController.cpp:815]: (style) Variable 'ok' is reassigned a value before the old one has been used. +[sources/cloudsync/CloudSyncController.cpp:489] -> [sources/cloudsync/CloudSyncController.cpp:497]: (style) Variable 'ok' is reassigned a value before the old one has been used. +[sources/cloudsync/CloudSyncController.cpp:651] -> [sources/cloudsync/CloudSyncController.cpp:652]: (style) Variable 'ok' is reassigned a value before the old one has been used. +[sources/cloudsync/CloudSyncController.cpp:662] -> [sources/cloudsync/CloudSyncController.cpp:664]: (style) Variable 'ok' is reassigned a value before the old one has been used. +[sources/cloudsync/CloudSyncController.cpp:690] -> [sources/cloudsync/CloudSyncController.cpp:691]: (style) Variable 'ok' is reassigned a value before the old one has been used. +[sources/cloudsync/CloudSyncController.cpp:780] -> [sources/cloudsync/CloudSyncController.cpp:781]: (style) Variable 'ok' is reassigned a value before the old one has been used. +[sources/cloudsync/CloudSyncController.cpp:869] -> [sources/cloudsync/CloudSyncController.cpp:870]: (style) Variable 'ok' is reassigned a value before the old one has been used. [sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.h:67] -> [sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationConfirmResponse.h:61]: (warning) The class 'MAdjustUltrafiltrationEditResponse' defines member variable with name 'stringPrefix' also defined in its parent class 'MAdjustUltrafiltrationConfirmResponse'. [sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.h:79] -> [sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationConfirmResponse.h:79]: (warning) The class 'MAdjustUltrafiltrationEditResponse' defines member variable with name '_data' also defined in its parent class 'MAdjustUltrafiltrationConfirmResponse'. [sources/storage/Settings.h:44]: (style) Unused private function: 'Settings::makeSetting' Index: cppcheck.sh =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- cppcheck.sh (.../cppcheck.sh) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ cppcheck.sh (.../cppcheck.sh) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -14,14 +14,17 @@ # ############################################################################ app_path=./ -cppcheck $app_path -v \ +cppcheck=cppcheck +$cppcheck --version +$cppcheck $app_path \ + --enable=all \ + -v \ -i$app_path/unittests \ -I$app_path/sources \ -I$app_path/sources/gui \ -I$app_path/sources/storage \ -I$app_path/sources/configuration \ -I$app_path/sources/canbus \ - --enable=all \ 1> $1cppcheck.log \ 2> $1cppcheck.err Index: denali.pro.user =================================================================== diff -u -r0f1aa395dfb46e006bdec10d0bb99f2ed27739bf -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- denali.pro.user (.../denali.pro.user) (revision 0f1aa395dfb46e006bdec10d0bb99f2ed27739bf) +++ denali.pro.user (.../denali.pro.user) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -1,6 +1,6 @@ - + EnvironmentId @@ -70,8 +70,8 @@ 0 true - true - Builtin.Questionable + false + {68936d18-4085-4cd5-8d07-e5835ffaef15} true Builtin.DefaultTidyAndClazy @@ -81,6 +81,14 @@ true + true + Builtin.TidyAndClazy + + /home/denali/Projects/application/denali.pro + + + + true @@ -89,7 +97,7 @@ Desktop Qt 5.12.5 GCC 64bit Desktop Qt 5.12.5 GCC 64bit qt.qt5.5125.gcc_64_kit - 1 + 0 0 0 @@ -1213,7 +1221,7 @@ denali Qt4ProjectManager.Qt4RunConfiguration:/home/denali/Projects/application/denali.pro - --logOut --disable-timeout --disable-alarm-no-minimize --disable-unhandled-report + --logOut --disable-timeout --disable-alarm-no-minimize --disable-unhandled-report --disable-check-in-log 3768 false true @@ -1222,7 +1230,7 @@ true false - /home/denali/Projects/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Release + /home/denali/Projects/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Debug 1 Index: main.cpp =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- main.cpp (.../main.cpp) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ main.cpp (.../main.cpp) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -88,6 +88,7 @@ bool gEnableDialinUnhandled = false ; bool gDisableTimeout = false ; bool gDisableAlarmNoMinimize = false ; +bool gDisableCheckInLog = false ; bool gConsoleoutLogs = false ; bool gConsoleoutFrameInterface = false ; @@ -201,6 +202,11 @@ QCoreApplication::translate("main", "Disables alarm no minimize")); parser.addOption(optionDisableAlarmMoMinimize); + // --- -k : disable-Check-in-log (keep-alive) + QCommandLineOption optionDisableCheckInLog(QStringList() << "k" << "disable-check-in-log", + QCoreApplication::translate("main", "Disables Check-In Log")); + parser.addOption(optionDisableCheckInLog); + // --- parse command lines parser.process(*qApp); @@ -211,6 +217,7 @@ gEnableDialinUnhandled = parser.isSet(optionEnableDialinUnhandled ); gDisableTimeout = parser.isSet(optionDisableTimeout ); gDisableAlarmNoMinimize = parser.isSet(optionDisableAlarmMoMinimize ); + gDisableCheckInLog = parser.isSet(optionDisableCheckInLog ); if (parser.isSet(optionSendEmptyKeepAwake)) gSendEmptyKeepAwake = true; bool ok = false; Index: sources/ApplicationPost.cpp =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -53,12 +53,15 @@ // although some are not failing the final result, // so they need to be assigned to a variable and then, AND(&&) them, // otherwise on the first fail rest of the checks will not run by compiler optimization. - _isDone = _isShaSum && - _isCANBus && - _isDisplay && - _isTouch && - _isSDCard && - _isRtc ; + _isDone = isShaSum () && + isCANBus () && + isDisplay () && + isTouch () && + isSDCard () && + isRtc () && + isWiFi () && + isBluetooth () + ; } else { // TODO: Ignored for now but this could be a FileSystem check failure, and the post.log has to always exist. Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -227,9 +227,9 @@ if ( length ) { // this message has a variable length vPayload = Format::fromVariant(vData[0]); } -#if DISABLE_CHECKIN_LOG == 0 - LOG_EVENT_UI(QString("CheckIn")); -#endif + if ( ! gDisableCheckInLog ) + LOG_EVENT_UI(QString("CheckIn")); + break; case Gui::GuiActionType::ID_RawData: // len: 255, can have any len Index: sources/cloudsync/CloudSyncController.cpp =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/cloudsync/CloudSyncController.cpp (.../CloudSyncController.cpp) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/cloudsync/CloudSyncController.cpp (.../CloudSyncController.cpp) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -320,6 +320,8 @@ case eError_CredentialCopy : text = tr( "CS The credentials file copy failed." ) ; break; case eError_CredentialRemove: text = tr( "CS The credentials file remove failed." ) ; break; case eError_CredentialEmpty : text = tr( "CS The credentials folder is empty." ) ; break; + case eError_TxCodeNoParam : text = tr( "CS No Treatment Code provided." ) ; break; + case eError_TxCodeEmpty : text = tr( "CS The provided Treatment Code is empty." ) ; break; } return text; } @@ -359,6 +361,8 @@ case eError_CredentialCopy : info = QString( "[%1:%2]" ).arg( vErrorID ).arg( item(0) ) ; break; case eError_CredentialRemove: info = QString( "[%1:%2]" ).arg( vErrorID ).arg( item(0) ) ; break; case eError_CredentialEmpty : info = QString( "[%1:%2]" ).arg( vErrorID ).arg( item(0) ) ; break; + case eError_TxCodeNoParam : info = QString( "[%1:%2]" ).arg( vErrorID ).arg( item(0) ) ; break; + case eError_TxCodeEmpty : info = QString( "[%1:%2]" ).arg( vErrorID ).arg( item(0) ) ; break; } return info; } @@ -564,13 +568,23 @@ // Same parameters will be sent for these messages for now, so data is not changed. switch (vAction) { - // case GuiActionType::ID_PreTreatmentStates : // has not been discussed how to be sent out. - // case GuiActionType::ID_TreatmentStates : // has not been discussed how to be sent out. - // case GuiActionType::ID_PostTreatmentStates : // has not been discussed how to be sent out. - // case GuiActionType::ID_DisinfectStates : // has not been discussed how to be sent out. - case GuiActionType::ID_HDOperationModeData : - if (saveUIHistory(eMessageID_DeviceState , vData )) // if not empty, nor duplicate, and saved - sendUIHistory(eMessageID_DeviceState ); + case GuiActionType::ID_HDOperationModeData : { + // ---------------------------------------------------------------------------------------- + // DEBUG : disable the HD HW message on the device on CloudSync integration testing. + // currently it is always on fault and resets CloudSync inp log + QVariantList varData = vData; + QStringList strData = Format::fromVariantList(vData); + if ( strData.length() == 2 ) { + if ( strData[0] == "0" ) { + if ( strData[1] == "1") { varData = {0,0}; } // use Fault, wait4Tx instead of 0,0 to send fault. to able to simulate and bypass HD. + else { return; } + } + } + // ---------------------------------------------------------------------------------------- + + if (saveDeviceState(varData)) // if not empty, nor duplicate, and saved + sendDeviceState(); + } break; case GuiActionType::ID_AdjustSerialHDRsp : @@ -594,6 +608,7 @@ void CloudSyncController::onTreatmentLogSave(const QString &/*vDeviceID*/, const QString &/*vPatientID*/, const QString &vFileName) { QVariantList data { /*vDeviceID, vPatientID,*/ vFileName }; + sendCredentialsSend(); // TODO: This has to be removed later, it is a workaround for Cloud issue, during our talk with KBM. saveUIHistory(eMessageID_TxReport, data ); sendUIHistory(eMessageID_TxReport ); } @@ -617,19 +632,35 @@ case eMessageID_ResetFactory : ok = sendResetFactory ( ); break; case eMessageID_DeviceState : ok = sendDeviceState ( ); break; + case eMessageID_TxCodeDisplay : ok = sendTxCodeDisplay ( vMessage ); break; + case eMessageID_TxReport : /* No Req/Rsp, it is event based */ break; // This message doesn't have the response since there is no request. UI will send when the data ready by HD. } return ok; } /*! + * \brief CloudSyncController::saveDeviceState + * \details Saves the device state in the history for later request + * \param vData - the device information + * \return + */ +bool CloudSyncController::saveDeviceState(const QVariantList &vData) +{ + bool ok = false; + ok = saveUIHistory(eMessageID_DeviceState, vData); + return ok; +} + +/*! * \brief CloudSyncController::sendDeviceState * \return Sends the last received device state from history to CloudSync */ bool CloudSyncController::sendDeviceState() { bool ok = false; + sendCredentialsSend(); // TODO: This has to be removed later, it is a workaround for Cloud issue, during our talk with KBM. ok = sendUIHistory(eMessageID_DeviceState); return ok; } @@ -716,6 +747,30 @@ } /*! + * \brief CloudSyncController::sendTxCodeDisplay + * \details reads the received Tx Code from CloudSync app and notifies with a signal. + * \param vMessage : message containing the Tx Code. + * \return true on successful extracting the Tc Code. + */ +bool CloudSyncController::sendTxCodeDisplay(const CloudSyncController::Message &vMessage) +{ + bool ok = true; + QString mTxCode; + + // although it has been checked in the interpreter, we won't risk the crash and check the list empty. + if ( vMessage.params.isEmpty() ) { toLog(eError_TxCodeNoParam , {}); ok = false; goto lOut; } + + mTxCode = vMessage.params[0].trimmed(); + if ( mTxCode.isEmpty() ) { toLog(eError_TxCodeEmpty , {}); ok = false; goto lOut; } + + emit didTxCodeReceive ( mTxCode ); + qDebug() << " ---------- " << mTxCode; + +lOut: + return ok; +} + +/*! * \brief CloudSyncController::sendDeviceRegister * \details sends the device registration request * \return true on successful send. Index: sources/cloudsync/CloudSyncController.h =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/cloudsync/CloudSyncController.h (.../CloudSyncController.h) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/cloudsync/CloudSyncController.h (.../CloudSyncController.h) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -100,6 +100,9 @@ eError_CredentialRemove , // the credential files sent to UI can't be removed. eError_CredentialEmpty , // the UI folder doesn't have credential files. + eError_TxCodeNoParam , // the received Tx Code not provided + eError_TxCodeEmpty , // the received Tx Code is empty + eError_OutFileEmpty , // Out file has changed from CS2UI but the content is empty. }; @@ -138,13 +141,16 @@ eMessageID_DeviceRegister = 1, // [ UI(1001) -> CS( ) ] Device Registration Request eMessageID_DeviceInfo = 2, // [ CS(2002) <-> UI(1002) ] Device information Request - eMessageID_CredentialsSave = 3, // [ CS(2003) -> UI(1003) ] Save Credentials Request + eMessageID_CredentialsSave = 3, // [ CS(2003) -> UI( ) ] Save Credentials Request eMessageID_CredentialsSend = 4, // [ CS(2004) <-> UI(1004) ] Send Credentials Request eMessageID_ResetFactory = 5, // [ CS(2005) <-> UI(1005) ] Reset Factory Request // Deployment eMessageID_DeviceState = 6, // [ CS(2006) <-> UI(1006) ] Device State Request // Tx Report eMessageID_TxReport = 7, // [ UI(1007) -> CS(2007) ] TxReport Notify + // Tx Code + eMessageID_TxCodeDisplay = 8, // [ CS(2008) -> UI( ) ] Display TxCode Request + // // Subject to change so has been commented out for now // @@ -157,6 +163,7 @@ QHash paramCount { { eMessageID_CredentialsSave , 3 }, + { eMessageID_TxCodeDisplay , 1 }, }; enum DeviceInfo_Enum { @@ -183,6 +190,7 @@ signals: void didInitComplete (); + void didTxCodeReceive (const QString &vTxCode); private: void initConnections(); @@ -233,6 +241,7 @@ bool testDeviceRegister (); // eMessageID_DeviceRegister // device state report + bool saveDeviceState (const QVariantList &vData); bool sendDeviceState (); // eMessageID_DeviceState // reset Factory @@ -242,4 +251,6 @@ bool sendCredentialsSave (const Message &vMessage); // eMessageID_SaveCredentials bool sendCredentialsSend (); // eMessageID_SendCredentials + bool sendTxCodeDisplay (const Message &vMessage); // eMessageID_TxCodeDisplay + }; Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r301c0a2101eb9374145ae274c8d91460fc9a6a62 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 301c0a2101eb9374145ae274c8d91460fc9a6a62) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -88,7 +88,7 @@ readonly property int opacityAnimationDuration : 1200 readonly property int sliderTextMargin : 20 - readonly property int treatmentSpacing : 60 + readonly property int treatmentSpacing : 80 // 60 readonly property int notificationHeight : 60 readonly property int notificationIconDiameter : 36 Index: sources/gui/qml/pages/UserConfirmation.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/gui/qml/pages/UserConfirmation.qml (.../UserConfirmation.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/pages/UserConfirmation.qml (.../UserConfirmation.qml) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -40,8 +40,6 @@ TextEntry { id : _password clip : true visible : _root.isPassword - label.text : qsTr("Password") - label .width : 150 textInput .width : 450 anchors { top : parent.top Index: sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -49,6 +49,14 @@ backColor : Colors.backgroundDialog } + Label { id: _txCode + anchors.bottom : _flickable.top + anchors.left : _flickable.left + width : _flickable.width + text : qsTr("Code: ") + vPostTreatmentAdjustmentTreatmentLog.txCode + font.pixelSize : Fonts.fontPixelButton + } + Flickable { id: _flickable clip: true anchors { Index: sources/gui/qml/pages/pretreatment/connection/PreTreatmentConnectionStack.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/gui/qml/pages/pretreatment/connection/PreTreatmentConnectionStack.qml (.../PreTreatmentConnectionStack.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/pages/pretreatment/connection/PreTreatmentConnectionStack.qml (.../PreTreatmentConnectionStack.qml) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -91,6 +91,7 @@ PreTreatmentBase { id: _preTreatmentStartTreatment header.stepIndex : 8 header.confirmVisible : true + header.backVisible : true title.text : qsTr("Start Treatment") header.confirmText.text : qsTr("START") instructionBased : true Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml (.../PreTreatmentConfirm.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml (.../PreTreatmentConfirm.qml) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -53,7 +53,6 @@ clip: true Column { id: _column - spacing: Variables.treatmentSpacing anchors.horizontalCenter: parent.horizontalCenter; anchors.fill: parent; Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -194,11 +194,13 @@ GridSelection { id: _dialyzerType objectName : "_dialyzerTypeRect" - title : qsTr("Dialyzer Type") - labels : vTreatmentCreate.dialyzerTypeOptions + title : qsTr("Dialyzer Type") + labels : vTreatmentCreate.dialyzerTypeOptions onClicked : vTreatmentCreate.dialyzerType = curIndex } + Item { height: 1; width: 1 /* TODO : there is a design flaw in here, this is a workaround */ } + SliderCreateTreatment { id: _dialysateTemperature objectName : "_dialysateTemperature" label : qsTr("Dialysate Temperature") Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml (.../PreTreatmentCreateStack.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml (.../PreTreatmentCreateStack.qml) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -57,7 +57,6 @@ title.text : qsTr("Patient ID") header.backVisible : true header.confirmVisible : true - header.confirmEnabled : _pretreatmentPatientIDEntry.text.trim() TextEntry { id : _pretreatmentPatientIDEntry property int topMarginContent : 200 Index: sources/gui/qml/pages/settings/SettingsDG.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/gui/qml/pages/settings/SettingsDG.qml (.../SettingsDG.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/pages/settings/SettingsDG.qml (.../SettingsDG.qml) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -62,7 +62,7 @@ _heatDisinfectionScheduleTime .isValid && _heatDisinfectionScheduleCycle .isValid - confirmVisible : true + confirmVisible : false // TODO : phase 1 doesn't have this feature (disinfection schedule) confirmEnabled : _root.isValid firstFocusInput : _waterFlushScheduleTime notificationText: vSettingsDG.status @@ -77,6 +77,7 @@ } Row { id: _container + visible: false // TODO : phase 1 doesn't have this feature (disinfection schedule) spacing: 25 y : Qt.inputMethod.visible && _keyboard.visible ? topMarginContent : ( (_root.height - _container.height) / 2 ) Behavior on y { NumberAnimation { duration: Variables.keybardAnimationDuration } } Index: sources/gui/qml/pages/settings/SettingsHome.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/gui/qml/pages/settings/SettingsHome.qml (.../SettingsHome.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/pages/settings/SettingsHome.qml (.../SettingsHome.qml) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -37,8 +37,6 @@ signal itemClicked(int vIndex) - title : qsTr("Device Settings") - TouchGrid { id: _settingItems anchors.centerIn: _root onItemClicked : _root.itemClicked(vIndex) @@ -56,6 +54,7 @@ leftMargin : 35 } TouchRect { id : _clearAlarmCondition + visible : false // TODO : phase 1 doesn't have this feature (disinfection schedule) objectName: "_clearAlarmCondition" width : 300 height : Variables.logoDiameter Index: sources/gui/qml/pages/settings/SettingsStack.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -56,8 +56,8 @@ qsTr("Volume And Brightness" ), // VolumeBrightness qsTr("Wi-Fi" ), // WiFi qsTr("Bluetooth Cuff" ), // Bluetooth - qsTr("Dialysate Generator Settings" ), // DGSettings - qsTr("Services" ), // Services + qsTr("DG Cleaning" ), // DGSettings + qsTr("Service" ), // Service qsTr("Set Date And Time" ), // SetDateTime qsTr("Set Language" ), // Language qsTr("Calibration " ), // Calibration @@ -85,10 +85,10 @@ true , // DGSettings ! serviceMode , // Services serviceMode , // SetDateTime - serviceMode , // Language - serviceMode , // Calibration - serviceMode , // SWUpdate - serviceMode , // FactoryReset + false /* serviceMode phase 1 */ , // Language + false /* serviceMode phase 1 */ , // Calibration + false /* serviceMode phase 1 */ , // SWUpdate + false /* serviceMode phase 1 */ , // FactoryReset ] SettingsBase { id: _settingsInformation @@ -142,7 +142,7 @@ qsTr("DG FPGA Version" ), qsTr("DG Serial Number" ), - qsTr("Services" ), // col2 title + qsTr("Service" ), // col2 title qsTr("HD Last Service Date" ), qsTr("HD Next Service Date" ), qsTr("DG Last Service Date" ), @@ -173,7 +173,7 @@ UserConfirmation { id: _servicePassword itemIndex : SettingsStack.Services - title : qsTr("Please Enter The Service Password") + title : qsTr("Service Password") isPassword: true onBackClicked : { clearPassword() @@ -198,6 +198,7 @@ } SettingsHome { id : _settingsHome + title : serviceMode ? qsTr("Service") : qsTr("Device Settings") backVisible : false confirmVisible : serviceMode confirmText.text: qsTr("SHUTDOWN") Index: sources/gui/qml/pages/settings/SettingsWiFi.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -220,10 +220,10 @@ UserConfirmation { id : _userConfirmation property string ssid : "" property string macAddress : "" - property string separator : "\n" + property string separator : "\n\n" // notificationText : vNetwork.status message : qsTr("Do you want to disconnect from `%1`?").arg(ssid) - title : isPassword ? qsTr("Join") + separator + ssid : qsTr("Disconnect") + separator + ssid + title : isPassword ? qsTr("Join") + separator + ssid + qsTr("Password") : qsTr("Disconnect") + separator + ssid onConfirmClicked : { if ( isPassword ) { vNetwork.doJoinNetwork ( macAddress, password ) Index: sources/main.h =================================================================== diff -u -r301c0a2101eb9374145ae274c8d91460fc9a6a62 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/main.h (.../main.h) (revision 301c0a2101eb9374145ae274c8d91460fc9a6a62) +++ sources/main.h (.../main.h) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -64,6 +64,12 @@ extern bool gEnableDialinUnhandled ; extern bool gDisableTimeout ; extern bool gDisableAlarmNoMinimize ; +extern bool gDisableCheckInLog ; +extern bool gConsoleoutLogs ; +extern bool gConsoleoutFrameInterface ; +extern bool gConsoleoutCanInterface ; + + //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// #define SKIPPER_DEF(X) \ Index: sources/model/dg/data/MDGGeneralEvent.h =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/model/dg/data/MDGGeneralEvent.h (.../MDGGeneralEvent.h) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/model/dg/data/MDGGeneralEvent.h (.../MDGGeneralEvent.h) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -31,7 +31,7 @@ * * | MSG | CAN ID | Type | Ack | Src | Dst | Description | * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------:| - * |0xA400| 0x070 | Event | N | DG | UI | DG General Event | + * |0xA500| 0x070 | Event | N | DG | UI | DG General Event | * * | Payload || * | || Index: sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h (.../MPreTreatmentAdjustPatientConnectionConfirmResponse.h) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h (.../MPreTreatmentAdjustPatientConnectionConfirmResponse.h) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -32,7 +32,7 @@ * * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| - * |0x5300| 0x020 | 6 | Rsp | Y | HD | UI | PatientConnectionConfirm Response | + * |0x6700| 0x020 | 6 | Rsp | Y | HD | UI | PatientConnectionConfirm Response | * * | Payload || * | || Index: sources/model/hd/alarm/MAlarmMapping.cpp =================================================================== diff -u -r12588c91e1b95a5e5ded68b6818a0aa6579365ee -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/model/hd/alarm/MAlarmMapping.cpp (.../MAlarmMapping.cpp) (revision 12588c91e1b95a5e5ded68b6818a0aa6579365ee) +++ sources/model/hd/alarm/MAlarmMapping.cpp (.../MAlarmMapping.cpp) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -7,7 +7,7 @@ * * \file MAlarmMapping.cpp * \author (last) Behrouz NematiPour - * \date (last) 09-May-2022 + * \date (last) 23-May-2022 * \author (original) Behrouz NematiPour * \date (original) 03-May-2021 * @@ -135,7 +135,7 @@ /*0099*/case GuiAlarmID::ALARM_ID_HD_SYRINGE_PUMP_STALL : { result = QObject::tr("HD syringe pump stall alarm." ); break; } /* 99*/ /*0100*/case GuiAlarmID::ALARM_ID_HD_NO_CART_SELF_TEST_TIMEOUT : { result = QObject::tr("HD no cartridge self-test timeout." ); break; } /* 100*/ /*0101*/case GuiAlarmID::ALARM_ID_HD_DRY_SELF_TEST_TIMEOUT : { result = QObject::tr("HD dry self-test timeout." ); break; } /* 101*/ -/*0102*/case GuiAlarmID::ALARM_ID_SERVICE_MODE : { result = QObject::tr("System is in service mode." ); break; } /* 102*/ +/*0102*/case GuiAlarmID::ALARM_ID_DG_HEAT_DISINFECT_TEMP_GRAD_OUT_OF_RANAGE : { result = QObject::tr("DG heat disinfect temperature gradient out of range." ); break; } /* 102*/ /*0103*/case GuiAlarmID::ALARM_ID_HD_NVDATAMGMT_CAL_GROUP_RECORD_CRC_INVALID : { result = QObject::tr("HD non-volatile calibration group invalid record CRC." ); break; } /* 103*/ /*0104*/case GuiAlarmID::ALARM_ID_AIR_TRAP_ILLEGAL_LEVELS : { result = QObject::tr("Air trap level sensors reporting illegal combination of air/fluid." ); break; } /* 104*/ /*0105*/case GuiAlarmID::ALARM_ID_DG_NVDATAMGMT_CAL_GROUP_RECORD_CRC_INVALID : { result = QObject::tr("DG non-volatile system group invalid record CRC." ); break; } /* 105*/ @@ -323,7 +323,8 @@ /*0287*/case GuiAlarmID::ALARM_ID_HD_FPGA_CLOCK_SPEED_CHECK_FAILURE : { result = QObject::tr("HD processor clock speed checks against FPGA clock failure." ); break; } /* 287*/ /*0288*/case GuiAlarmID::ALARM_ID_DG_TRIMMER_HEATER_ON_WITH_NO_FLOW_TIMEOUT : { result = QObject::tr("DG trimmer heater on with flow timeout." ); break; } /* 288*/ /*0289*/case GuiAlarmID::ALARM_ID_DG_DIALYSATE_OR_CONC_CAP_NOT_IN_PROPER_POSITION: { result = QObject::tr("DG dialysate or concentrate caps not closed." ); break; } /* 289*/ -/*0290*/case GuiAlarmID::NUM_OF_ALARM_IDS : { result = QObject::tr("Total number of alarms." ); break; } /* 290*/ +/*0290*/case GuiAlarmID::ALARM_ID_DG_FLOW_TOO_LOW_WHILE_HEATER_ON : { result = QObject::tr("DG flow too low while heater is on." ); break; } /* 290*/ +/*0291*/case GuiAlarmID::NUM_OF_ALARM_IDS : { result = QObject::tr("Total number of alarms." ); break; } /* 291*/ default: result = QObject::tr("ALARM_ID_UNDEFINED [%1]").arg(int(vAlarmID)); Index: sources/storage/TreatmentLog.cpp =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -22,6 +22,7 @@ #include "FileHandler.h" #include "Logger.h" #include "MSettings.h" +#include "CloudSyncController.h" #include "GuiGlobals.h" #include "MAlarmStatusData.h" @@ -43,6 +44,7 @@ logPath(Logger::eLogTrtmt, _Logger.logPath(Logger::eLogTrtmt)); } + /*! \brief Connection Initializer \details All the class signal/slot connections are defined here. */ @@ -55,6 +57,10 @@ connect(&_saveWatcher , SIGNAL(finished()), this , SLOT(onSave ())); + + connect(&_CloudSyncController , SIGNAL(didTxCodeReceive(const QString &)), + this , SLOT( onTxCodeReceive(const QString &))); + } /*! @@ -70,8 +76,8 @@ // SRSUI910 : PRS178 : Clinical - Data - Order - QString mTreatmentDurationFmt = QTime (0, 0).addSecs(vData.mTreatmentDuration ).toString(_timeFormat); - QString mActualTreatmentDurationFmt = QTime (0, 0).addSecs(vData.mActualTreatmentDuration ).toString(_timeFormat); + QString mTreatmentDurationFmt = QTime (0, 0).addSecs(int(vData.mTreatmentDuration )).toString(_timeFormat); + QString mActualTreatmentDurationFmt = QTime (0, 0).addSecs(int(vData.mActualTreatmentDuration )).toString(_timeFormat); QString mTreatmentDuration = QString::number(vData.mTreatmentDuration / 60 ); // Converted seconds to minutes. QString mActualTreatmentDuration = QString::number(vData.mActualTreatmentDuration / 60 ); // Converted seconds to minutes. QString mTreatmentStartDateTime = Format::fromEpoch( vData.mTreatmentStartEpoch , _datetimeFormat); @@ -94,7 +100,6 @@ _deviceID = mStrText.arg(vData.mDeviceID ); _values[ePatientID ] = vPatientID.trimmed() ; -// _values[eDeviceID ] = mStrText.arg(vData.mDeviceID ); // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. _values[eBloodFlowRate ] = mStrText.arg(vData.mBloodFlowRate ); _values[eDialysateFlowRate ] = mStrText.arg(vData.mDialysateFlowRate ); _values[eTreatmentDuration ] = mTreatmentDuration ; @@ -124,11 +129,8 @@ _values[eTargetUFRate ] = mStrText.arg(vData.mTargetUFRate ,FLOAT3 ); _values[eActualUFRate ] = mStrText.arg(vData.mActualUFRate ,FLOAT3 ); _values[eSalineBolusVolume ] = mStrText.arg(vData.mSalineBolusVolume ); -// _values[eAverageBloodFlow ] = mStrText.arg(vData.mAverageBloodFlow ,FLOAT3 ); // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// _values[eAverageDialysateFlow ] = mStrText.arg(vData.mAverageDialysateFlow ,FLOAT3 ); // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// _values[eAverageDialysateTemp ] = mStrText.arg(vData.mAverageDialysateTemp ,FLOAT3 ); // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// _values[eAverageArterialPressure ] = mStrText.arg(vData.mAverageArterialPressure ,FLOAT3 ); // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// _values[eAverageVenousPressure ] = mStrText.arg(vData.mAverageVenousPressure ,FLOAT3 ); // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. + + emit didTxCodeReceive("..."); /* put ... just to notify user about the wait for data */ } /*! @@ -217,7 +219,6 @@ ADDTITLE("Title"); ADDTOLOG( ePatientID ); -// ADDTOLOG( eDeviceID ); PRS 180: will be used only for the name not in the content. ADDTITLE("Treatment Parameters" ); ADDTOLOG( eTreatmentDuration ); @@ -255,11 +256,6 @@ ADDTITLE("Extra" ); ADDTOLOG( eWaterSampleTestResult ); -// ADDTOLOG( eAverageBloodFlow ); // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// ADDTOLOG( eAverageDialysateFlow ); // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// ADDTOLOG( eAverageArterialPressure ); // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// ADDTOLOG( eAverageVenousPressure ); // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// ADDTOLOG( eAverageDialysateTemp ); // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. ADDTITLE("Treatment Data" ); for ( const TreatmentLogAvrgeData &item : _treatmentLogAvrgeData ) { @@ -360,9 +356,9 @@ } /*! - * \brief TreatmentLog::exportLog - * The actual treatment log export function which does the export of the treatment log into the USB drive. - * \return + * \brief TreatmentLog::exportLog + * \details The actual treatment log export function which does the export of the treatment log into the USB drive. + * \return true on successful export. */ bool TreatmentLog::exportLog() { @@ -382,3 +378,15 @@ LOG_DEBUG(QString("Export Treatment Log Ended: %1").arg(_exportWatcher.result())); isIdle(true); } + +/*! + * \brief TreatmentLog::onTxCodeReceive + * \details this slot will update the treatment code sent by CS. + * \param vTxCode - The treatment code sent by CS. + * \note there should not be a getter for this, for thread safety, and who needs the data needs to connect to the signal. + */ +void TreatmentLog::onTxCodeReceive(const QString &vTxCode) +{ + _txCode = vTxCode; + emit didTxCodeReceive(_txCode); +} Index: sources/storage/TreatmentLog.h =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/storage/TreatmentLog.h (.../TreatmentLog.h) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/storage/TreatmentLog.h (.../TreatmentLog.h) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -78,7 +78,8 @@ _lastTxInfo; - QString _deviceID = ""; + QString _deviceID = ""; + QString _txCode = ""; // content of this value comes from CloudSync App. enum Role { eValue, @@ -88,7 +89,6 @@ enum TreatmentLogIndex { ePatientID , -// eDeviceID , // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. eBloodFlowRate , eDialysateFlowRate , eTreatmentDuration , @@ -118,18 +118,11 @@ eTargetUFRate , eActualUFRate , eSalineBolusVolume , -// eAverageBloodFlow , // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// eAverageDialysateFlow , // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// eAverageDialysateTemp , // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// eAverageArterialPressure , // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// eAverageVenousPressure , // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. - - eTreatmentLogIndexCount + eTreatmentLogIndexCount , }; const QStringList _titles { tr("Patient ID" ), // ePatientID -// tr("Device ID" ), // eDeviceID // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. tr("Blood Flow Rate" ), // eBloodFlowRate tr("Dialysate Flow Rate" ), // eDialysateFlowRate tr("Treatment Duration" ), // eTreatmentDuration @@ -159,16 +152,10 @@ tr("Target UF Rate" ), // eTargetUFRate tr("Actual UF Rate" ), // eActualUFRate tr("Saline Bolus Volume" ), // eSalineBolusVolume -// tr("Average Blood Flow" ), // eAverageBloodFlow // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// tr("Average Dialysate Flow" ), // eAverageDialysateFlow // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// tr("Average Dialysate Temp" ), // eAverageDialysateTemp // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// tr("Average Arterial Pressure" ), // eAverageArterialPressure // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// tr("Average Venous Pressure" ), // eAverageVenousPressure // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. }; const QStringList _units { "" , // ePatientID -// "" , // eDeviceID // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. _unitTextFlowRate , // eBloodFlowRate _unitTextFlowRate , // eDialysateFlowRate _unitTextDurationMin , // eTreatmentDuration @@ -198,11 +185,6 @@ _unitTextFlowRate , // eTargetUFRate _unitTextFlowRate , // eActualUFRate _unitTextFluid , // eSalineBolusVolume -// _unitTextFlowRate , // eAverageBloodFlow // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// _unitTextFlowRate , // eAverageDialysateFlow // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// _unitTextTemperature , // eAverageDialysateTemp // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// _unitTextBloodPressure , // eAverageArterialPressure // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. -// _unitTextBloodPressure , // eAverageVenousPressure // removed during our meeting with Sean and Jahnavi 04/11/2022@16:00. }; QString title(quint8 vIndex) const { @@ -250,6 +232,7 @@ void onLogPathSet(Logger::LogType vLogType, const QString &vLogPath); void onSave (); void onExport (); + void onTxCodeReceive(const QString &vTxCode); public slots: void doSave (); @@ -259,6 +242,7 @@ void didTreatmentLogSave( const QString &vDeviceID , const QString &vPatientID , const QString &vFileName ); + void didTxCodeReceive ( const QString &vTxCode ); }; } Index: sources/utility/types.h =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/utility/types.h (.../types.h) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/utility/types.h (.../types.h) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -147,7 +147,7 @@ bool Types::getValue(const QByteArray &vData, int &vStartIndex, T &vValue, QString vValueName) { int end = vStartIndex + sizeof(T); if (vData.length() < end) { - LOG_DEBUG(QString("Not enough data from position %1 to the length of %2 to get data of type '%3' in buffer %4%5") + LOG_DEBUG(QString("Not enough data from position %1 to the length of %2 to get data of type '%3' in buffer %4 %5") .arg(vStartIndex) .arg(sizeof(T)) .arg(typeid(T).name()) Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (.../VPostTreatmentAdjustTreatmentLog.cpp) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (.../VPostTreatmentAdjustTreatmentLog.cpp) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -38,7 +38,10 @@ ACTION_VIEW_CONNECTION(TreatmentLogEventData); connect(&_TreatmentLog , &TreatmentLog::isIdleNotified, - this , [=](bool vIdle){isIdle(vIdle);}); + [=](bool vIdle) { isIdle(vIdle); } ); + + connect(&_TreatmentLog , &TreatmentLog::didTxCodeReceive, + [=](const QString &vTxCode) { txCode( vTxCode ); } ); } /*! @@ -75,8 +78,6 @@ parametersText ( {} ); } - - // raw values bloodFlowRate ( vData.mBloodFlowRate ); dialysateFlowRate ( vData.mDialysateFlowRate ); Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h (.../VPostTreatmentAdjustTreatmentLog.h) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h (.../VPostTreatmentAdjustTreatmentLog.h) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -93,6 +93,8 @@ PROPERTY(QStringList , parametersUnit , _TreatmentLog.units ()) PROPERTY(QStringList , parametersText , {}) + PROPERTY(QString , txCode , "") + PROPERTY(bool , isIdle , true) VIEW_DEC_CLASS (VPostTreatmentAdjustmentTreatmentLog) Index: sources/view/settings/VAdjustmentService.cpp =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/view/settings/VAdjustmentService.cpp (.../VAdjustmentService.cpp) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/view/settings/VAdjustmentService.cpp (.../VAdjustmentService.cpp) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -22,9 +22,9 @@ VIEW_DEF_CLASS_ADJUSTMENT(VAdjustmentService) void View::VAdjustmentService::initConnections() { - ADJUST_VIEW_CONNECTION( AdjustServiceRequestData); - ACTION_VIEW_CONNECTION(AdjustServiceHDResponseData); - ACTION_VIEW_CONNECTION(AdjustServiceDGResponseData); + ADJUST_VIEW_CONNECTION( AdjustServiceRequestData) + ACTION_VIEW_CONNECTION(AdjustServiceHDResponseData) + ACTION_VIEW_CONNECTION(AdjustServiceDGResponseData) } void View::VAdjustmentService::onActionReceive(const AdjustServiceHDResponseData &vData) Index: sources/view/settings/VAdjustmentService.h =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/view/settings/VAdjustmentService.h (.../VAdjustmentService.h) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/view/settings/VAdjustmentService.h (.../VAdjustmentService.h) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -55,10 +55,10 @@ PROPERTY( quint8 , dgServiceInterval , 0) // Service data - PROPERTY( QString , hdLastServiceDate , 0) - PROPERTY( QString , hdNextServiceDate , 0) - PROPERTY( QString , dgLastServiceDate , 0) - PROPERTY( QString , dgNextServiceDate , 0) + PROPERTY( QString , hdLastServiceDate , "") + PROPERTY( QString , hdNextServiceDate , "") + PROPERTY( QString , dgLastServiceDate , "") + PROPERTY( QString , dgNextServiceDate , "") VIEW_DEC_CLASS(VAdjustmentService) VIEW_DEC_SLOT (AdjustServiceHDResponseData) Index: sources/view/settings/VAdjustmentVersions.h =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/view/settings/VAdjustmentVersions.h (.../VAdjustmentVersions.h) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/view/settings/VAdjustmentVersions.h (.../VAdjustmentVersions.h) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -77,12 +77,12 @@ PROPERTY( quint8 , dgVerFPGALab , 0) PROPERTY( quint32 , dgVerCompatibilityRev , 0) - PROPERTY( QString , hdVerDevice ,"") - PROPERTY( QString , hdVerFPGA ,"") - PROPERTY( QString , hdSerial ,"") - PROPERTY( QString , dgVerDevice ,"") - PROPERTY( QString , dgVerFPGA ,"") - PROPERTY( QString , dgSerial ,"") + PROPERTY( QString , hdVerDevice ,"") + PROPERTY( QString , hdVerFPGA ,"") + PROPERTY( QString , hdSerial ,"") + PROPERTY( QString , dgVerDevice ,"") + PROPERTY( QString , dgVerFPGA ,"") + PROPERTY( QString , dgSerial ,"") VIEW_DEC_CLASS(VAdjustmentVersions) VIEW_DEC_SLOT ( AdjustVersionsHDRequestData) Index: sources/view/settings/VDateTime.cpp =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r7e503c5459ec77a2816d6c7789da9b206cedbe8a --- sources/view/settings/VDateTime.cpp (.../VDateTime.cpp) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/view/settings/VDateTime.cpp (.../VDateTime.cpp) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) @@ -225,9 +225,9 @@ */ void VDateTime::greeting(quint16 vMilitaryTime) { - if ( eMorningMin <= vMilitaryTime && vMilitaryTime < eMorningMax ) { greeting(tr("Good Morning" )); return; } - if ( eAfternoonMin <= vMilitaryTime && vMilitaryTime < eAfternoonMax ) { greeting(tr("Good Afternoon")); return; } - greeting(tr("Good Evening" )); + if ( eMorningMin /* 05:00 AM */ <= vMilitaryTime && vMilitaryTime < eMorningMax /* 12:00 PM */ ) { greeting(tr("Good Morning" )); return; } + if ( eAfternoonMin /* 12:00 PM */ <= vMilitaryTime && vMilitaryTime < eAfternoonMax /* 18:00 PM */ ) { greeting(tr("Good Afternoon")); return; } + /* 18:00 PM */ /* 05:00 AM */ greeting(tr("Good Evening" )); } /*!