Index: denali.pro.user =================================================================== diff -u -r9ae3b0d6624904693329309aaf8ff02784c17184 -raa873f8620e3f402bf60827e9c54623b5e09280e --- denali.pro.user (.../denali.pro.user) (revision 9ae3b0d6624904693329309aaf8ff02784c17184) +++ denali.pro.user (.../denali.pro.user) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) @@ -1,6 +1,6 @@ - + EnvironmentId Index: main.cpp =================================================================== diff -u -r9ae3b0d6624904693329309aaf8ff02784c17184 -raa873f8620e3f402bf60827e9c54623b5e09280e --- main.cpp (.../main.cpp) (revision 9ae3b0d6624904693329309aaf8ff02784c17184) +++ main.cpp (.../main.cpp) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) @@ -86,6 +86,7 @@ bool gFakeSeqAtBegin = false ; bool gDisableUnhandledReport = false ; bool gDisableTimeout = false ; +bool gDisableAlarmMoMinimize = false ; bool gConsoleoutLogs = false ; bool gConsoleoutFrameInterface = false ; @@ -186,6 +187,11 @@ QCoreApplication::translate("main", "Disables HD communication timeout")); parser.addOption(optionDisableTimeout); + // --- -a : disable-alarm-no-minimize + QCommandLineOption optionDisableAlarmMoMinimize(QStringList() << "a" << "disable-alarm-no-minimize", + QCoreApplication::translate("main", "Disables alarm no minimize")); + parser.addOption(optionDisableAlarmMoMinimize); + // --- parse command lines parser.process(*qApp); @@ -194,6 +200,7 @@ gConsoleoutLogs = parser.isSet(optionConsoleoutLogs ); gDisableUnhandledReport = parser.isSet(optionDisableUnhandledReport ); gDisableTimeout = parser.isSet(optionDisableTimeout ); + gDisableAlarmMoMinimize = parser.isSet(optionDisableAlarmMoMinimize ); if (parser.isSet(optionSendEmptyKeepAwake)) gSendEmptyKeepAwake = true; bool ok = false; Index: resources/settings/Messages/Unhandled.conf =================================================================== diff -u --- resources/settings/Messages/Unhandled.conf (revision 0) +++ resources/settings/Messages/Unhandled.conf (revision aa873f8620e3f402bf60827e9c54623b5e09280e) @@ -0,0 +1,275 @@ +# How To: +# For this file to work as Unhandled Messges definition, it needs to be in the +# /home/root/.config/ of the device or if it is being used on the VM it has to be in the +# /home/denali/Projects/application/resources/settings/ of the VM. +# the groups are the message ids +# formatted in the hex and has to have the 0x and has to be in 2bytes format. +# the keys in order are: +# 1 - the message short name to be used in log. +# 2 - varable number of parameters type +# 3 - any value for a key will be ignored for now. +# message [0x4900] as an example has value for the two keys (parameter type) it has which will be ignore. +# 4 - Every unhandled message listed in the unhandled.conf file will be logged as Data, +# since from UI perspective event is a bidirectional, +# in opposed to data message which is sent on a predefined frequency. +# 5 - All the channels even DG->HD or HD->DG are logged as well. +# 6 - If a message is handled by the UI, it will never look into this file. +# 7 - The logged messages will only contain the source not the destination. +# so in case the message is comming from DG->HD, only the DG as the source will be logged. +# 8 - The title of the message is yours to put the destination as well if is not UI, +# but please don't make it too long. +# 9 - Please only use [A-Z, a-z] characters in the title and avoid using special characters (specially comma). +# since th log output is in csv format and the separator is comma and each column has meaing. +#10 - In case the received message is shorter than defined (in this file), +# for the missing parameters, a question mark (?) will be used. +# + +[0x0A00] +HD_RTC_Epoch_Data +U32=Epoch + +[0x1900] +DG_Dialysate_Tgt_Temps +F32=Primary Heater +F32=Trimmer Heater + +[0x2100] +DG_Switch_Res_Cmd +U32=Reservoir + +[0x2200] +DG_Fill_Cmd +U32=Fill volume +U32=Start/Stop + +[0x2300] +DG_Drain_Cmd +U32=Drain volume +U32=Tare/No Tare +U32=Rinse concentrate lines or not + +[0x2600] +DG_Cmd +U32=Start/Stop + +[0x2900] +DG_Sample_Water_Cmd +U32=Cmd + +[0x2B00] +DG_Trimmer_Htr_Cmd +U32=Start/Stop +F32=Target temperature + +[0x3000] +DG_Heat_Disinfect_Cmd +U32=Start/Stop + +[0x3100] +DG_Conductivity_Sensors_Data +F32=Reject Ratio +F32=CPi +F32=CPo +F32=CD1 +F32=CD2 + +[0x3700] +DG_Heat_Disinfect_Data +U32=Heat Disinfect State +U32=Heat Disinfect Total Time +U32=Heat Disinfect State Time +U32=Heat Disinfect Disinfect Time +U32=Cancel Mode +F32=R1 Fill Level +F32=R2 Fill Level +U32=UI Data + +[0x3A00] +HD_Valves_Data +U32=ValveID +U32=Valve State +U32=PosID +S16=Position +S16=Next Position +F32=Current +S16=PositionC +S16=PositionA +S16=PositionB +U32=PWM DC +U32=Air Trap Valve State + +[0x3E00] +Air_Trap_Data +U32=Lower Level +U32=Upper Level + +[0x4200] +DG_Concentrate_Pump_Data +F32=CP1 Set Speed +F32=CP1 Measured Speed +F32=CP2 Set Speed +F32=CP2 Measured Speed + +[0x4400] +DG_UV_Reactors_Data +U32=Inlet UV Health Status +U32=Outlet UV Health Status +U32=Inlet UV State +U32=Outlet UV State + +[0x4500] +DG_Thermistors_Data +F32=Board Temp +F32=PS1 Temp +F32=PS2 Temp + +[0x4800] +DG_Fans_Data +F32=Calc PWM DC +F32=Target RPM +F32=Inlet Fan 1 RPM +F32=Inlet Fan 2 RPM +F32=Inlet Fan 3 RPM +F32=Outlet Fan 1 RPM +F32=Outlet Fan 2 RPM +F32=Outlet Fan 3 RPM + +[0x4900] +TxStopPrg +U32=Timeout (secs) +U32=Timeout countdown (secs) + +[0x5100] +DG_Cmd_Rsp +U32=CmdID +U32=Rejected/Accepted +U32=Reject Reason + +[0x5B00] +DG_Chg_Valves_Cmd +U32=Res transfer direction + +[0x6A00] +HD_Fluid_Leak_Data +U32=Leak State + +[0x6B00] +DG_Fluid_Leak_Data +U32=Leak State + +[0x6C00] +HD_Blood_Leak_Data +U32=Leak Status +U32=Leak State + +[0x7800] +DG_Chem_Disinfect_Cmd +U32=Start/Stop + +[0x7900] +DG_Flush_Cmd +U32=Start/Stop + +[0x7A00] +DG_Flush_Data +U32=State +U32=Time +U32=State Time + +[0x7B00] +HD_Voltages_Data +F32=1.2V +F32=3.3V +F32=5V Logic +F32=5V Sensors +F32=24V +F32=24V Regen +F32=1.25V FPGA ADC Ref +F32=3V PBA Ref +F32=1V FPGA Vcc +F32=1.8V FPGA Vaux +F32=0V FPGA Vpvn + +[0x8600] +DG_Voltages_Data +F32=1V FPGA +F32=1.2V Processor +F32=1.8V Processor +F32=1.8V FPGA +F32=3V Vref +F32=3V Ext ADC1 +F32=3V Ext ADC2 +F32=3.3V +F32=3.3V Sensors +F32=5V Logic +F32=5V Sensors +F32=5V PS Gate Driver +F32=24V main +F32=24V small primary heating element +F32=24V trimmer heating element + +[0x8700] +DG_Chemical_Disinfect_Data +U32=State +U32=Time +U32=State Time +U32=Cancel Mode +F32=R1 Fill Level +F32=R2 Fill Level +U32=Target rinse count +U32=Rinse count +U32 UI State + +[0x8B00] +HD_Usage_Data +U32=Treatment count + +[0x8D00] +DG_Usage_Data +F32=Liters + +[0x9300] +Bubble_Data +U32=Arterial bubble detector status +U32=Arterial bubble detector state +U32=Venous bubble detector status +U32=Venous bubble detector state + +[0x9A00] +HD_Standby_Disinfect_Req + +[0x9B00] +HD_Set_Standby_Disinfect_State_Response +U32=Accepted or Rejected +U32=Reject Reason + +[0x9D00] +DG_POST_Result_Req + +[0x9D00] +HD_Temperature_Data +F32=Board temperature +F32=PS 1 temperature +F32=FPGA temperature +F32=PBo temperature +F32=PBA ADC temperature + +[0xA000] +HD_Usage_Info_Req + +[0xA100] +DG_Switches_Data +U32=Concentrate cap status +U32=Dialysate cap status +U32=Door status + +[0xA200] +HD_Switches_Data +U32=Door switch + +[0xA300] +HD_Fans_Data +F32=PWM Duty Cycle +F32=Target RPM +F32=Inlet fan 1 RPM + Fisheye: Tag aa873f8620e3f402bf60827e9c54623b5e09280e refers to a dead (removed) revision in file `resources/settings/messages/unhandled.conf'. Fisheye: No comparison available. Pass `N' to diff? Index: scripts/run.sh =================================================================== diff -u -r3e64d98e243484505a44d99b13826097cb6b01eb -raa873f8620e3f402bf60827e9c54623b5e09280e --- scripts/run.sh (.../run.sh) (revision 3e64d98e243484505a44d99b13826097cb6b01eb) +++ scripts/run.sh (.../run.sh) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) @@ -29,6 +29,8 @@ USB_DEV=/dev/sda1 USB_MNT=/media/usb POSTLOG=$HOME/post.log +POSTERR=$HOME/post.err +POSTOUT=$HOME/post.out POSTMSG_CANBUS="CANBus passed" POSTMSG_SDCARD="SD-CARD passed" POSTMSG_TOUCH="Touch passed" @@ -121,7 +123,7 @@ # setup bluetooth -/usr/share/silex-uart/silex-uart.sh start > $HOME/filesystem.out 2> $HOME/filesystem.err +/usr/share/silex-uart/silex-uart.sh start 1>> $POSTOUT 2>> $POSTERR sleep 5 hciconfig hci0 up if [ $? -eq 0 ]; then @@ -130,27 +132,21 @@ # setup wifi -killall wpa_supplicant >> $HOME/filesystem.out 2>> $HOME/filesystem.err -if [[ ! -z $(ip a | grep "wlan0:" | grep "state UP") ]]; then +killall wpa_supplicant 1>> $POSTOUT 2>> $POSTERR +if [[ ! -z $(dmesg | grep "wlan: driver loaded") ]]; then echo $POSTMSG_WIFI >> $POSTLOG fi + #check the denali applicatoin checksum -#sha256sum -b --tag denali >> denali -SHA_ACT=$(tail -c 83 ./denali | cut -c19-82) -SHA_EXP=$(head -c -83 ./denali | sha256sum -b --tag | cut -c14-77) +SHA_ACT=$(tail -c 83 $HOME/denali | cut -c19-82) +SHA_EXP=$(head -c -83 $HOME/denali | sha256sum -b --tag | cut -c14-77) if [ "$SHA_ACT" == "$SHA_EXP" ]; then echo $POSTMSG_SHASUM >> $POSTLOG -else - echo "Application ShaSum Failed" - # Disabled for now, it needs setup on the Bamboo server. - # exit 100 fi - - -#launching denali application, disable keep-alive +#launching denali application $HOME/denali -u & Index: scripts/setup.sh =================================================================== diff -u -r936ed882bee8169edec9fe24cbd4e49ccca667d9 -raa873f8620e3f402bf60827e9c54623b5e09280e --- scripts/setup.sh (.../setup.sh) (revision 936ed882bee8169edec9fe24cbd4e49ccca667d9) +++ scripts/setup.sh (.../setup.sh) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) @@ -18,6 +18,9 @@ # to use the system time/date and not use the network time protocol timedatectl set-ntp 0 +echo "Setup the timezone (UTC)" +timedatectl set-timezone UTC + echo "Setup the time/date" while true; do read -p "please enter the date (yyyy-MM-dd HH:mm): " -r DATE @@ -27,10 +30,6 @@ fi done -echo "Setup the timezone (PST)" -rm -f /etc/localtime -ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime - echo "Setup the hardware clock" hwclock -w Index: sources/ApplicationPost.cpp =================================================================== diff -u -r3e64d98e243484505a44d99b13826097cb6b01eb -raa873f8620e3f402bf60827e9c54623b5e09280e --- sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision 3e64d98e243484505a44d99b13826097cb6b01eb) +++ sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) @@ -78,7 +78,7 @@ bool ok = _content.contains(_postmsg_shasum); if (! ok) emit didFail(Gui::GuiAlarmID::ALARM_ID_UI_POST_FAILURE_SHASUM); emit didShaSum(ok); - return true;// ok; //TODO: always true for now. Look at the class to-do note. + return ok; } /*! Index: sources/gui/qml/pages/MainHome.qml =================================================================== diff -u -r506a9e3db1a20bda1685e38c5e9041005c9a4a4f -raa873f8620e3f402bf60827e9c54623b5e09280e --- sources/gui/qml/pages/MainHome.qml (.../MainHome.qml) (revision 506a9e3db1a20bda1685e38c5e9041005c9a4a4f) +++ sources/gui/qml/pages/MainHome.qml (.../MainHome.qml) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) @@ -44,13 +44,14 @@ TitleText { id: _titleText anchors.horizontalCenter: parent.horizontalCenter width: parent.width - text : qsTr("Good Morning") + text : vDateTime.greeting } - TouchRect { id : _startTreatmentRect - anchors.horizontalCenter: parent.horizontalCenter - text.text: qsTr("START TREATMENT") - onClicked: startTreatment() - } + // Removed for phase 1 + // TouchRect { id : _startTreatmentRect + // anchors.horizontalCenter: parent.horizontalCenter + // text.text: qsTr("START TREATMENT") + // onClicked: startTreatment() + // } TouchRect { id : _createTreatmentRect anchors.horizontalCenter: parent.horizontalCenter text.text: qsTr("CREATE TREATMENT") Index: sources/main.h =================================================================== diff -u -r9ae3b0d6624904693329309aaf8ff02784c17184 -raa873f8620e3f402bf60827e9c54623b5e09280e --- sources/main.h (.../main.h) (revision 9ae3b0d6624904693329309aaf8ff02784c17184) +++ sources/main.h (.../main.h) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) @@ -52,13 +52,14 @@ private: //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// -extern int gFakeInterval; -extern QByteArray gFakeData; -extern const char*gFakeData_default; -extern bool gSendEmptyKeepAwake; -extern bool gFakeSeqAtBegin; -extern bool gDisableUnhandledReport; -extern bool gDisableTimeout; +extern int gFakeInterval ; +extern QByteArray gFakeData ; +extern const char*gFakeData_default ; +extern bool gSendEmptyKeepAwake ; +extern bool gFakeSeqAtBegin ; +extern bool gDisableUnhandledReport ; +extern bool gDisableTimeout ; +extern bool gDisableAlarmMoMinimize ; //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// #define SKIPPER_DEF(X) \ Index: sources/view/hd/alarm/VAlarmStatus.cpp =================================================================== diff -u -r76d4131d70c18cbfaf47c242c17258e80161e8dc -raa873f8620e3f402bf60827e9c54623b5e09280e --- sources/view/hd/alarm/VAlarmStatus.cpp (.../VAlarmStatus.cpp) (revision 76d4131d70c18cbfaf47c242c17258e80161e8dc) +++ sources/view/hd/alarm/VAlarmStatus.cpp (.../VAlarmStatus.cpp) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) @@ -140,7 +140,12 @@ // (vData.mFlags.at(GuiAlarmFlags::ALARM_STATE_FLAG_BIT_POS_UNUSED_1 )); // (vData.mFlags.at(GuiAlarmFlags::ALARM_STATE_FLAG_BIT_POS_UNUSED_2 )); // (vData.mFlags.at(GuiAlarmFlags::ALARM_STATE_FLAG_BIT_POS_UNUSED_3 )); - alarm_Flag_noMinimize (vData.mFlags.at(GuiAlarmFlags::ALARM_STATE_FLAG_BIT_POS_NO_MINIMIZE )); + if ( gDisableAlarmMoMinimize ) { + alarm_Flag_noMinimize (false); + } + else { + alarm_Flag_noMinimize (vData.mFlags.at(GuiAlarmFlags::ALARM_STATE_FLAG_BIT_POS_NO_MINIMIZE )); + } alarm_Flag_alarmsCondition (vData.mFlags.at(GuiAlarmFlags::ALARM_STATE_FLAG_BIT_POS_TOP_CONDITION )); if (vData.mTop == GuiAlarmID::ALARM_ID_NO_ALARM) { Index: sources/view/hd/data/posttreatment/VPostTreatmentStatesData.cpp =================================================================== diff -u -r88563177f10f20ced98750b2e40036201728131d -raa873f8620e3f402bf60827e9c54623b5e09280e --- sources/view/hd/data/posttreatment/VPostTreatmentStatesData.cpp (.../VPostTreatmentStatesData.cpp) (revision 88563177f10f20ced98750b2e40036201728131d) +++ sources/view/hd/data/posttreatment/VPostTreatmentStatesData.cpp (.../VPostTreatmentStatesData.cpp) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) @@ -32,7 +32,7 @@ drainReservoirs ( vData.mSubMode == GuiPostTreatmentStates::HD_POST_TREATMENT_DRAIN_RESERVOIRS_STATE ); verify ( vData.mSubMode == GuiPostTreatmentStates::HD_POST_TREATMENT_VERIFY_STATE ); - // *** Only for test ***S + // *** Only for test *** // Be careful it is always triggered on each message. state(true); } Index: sources/view/settings/VDateTime.cpp =================================================================== diff -u -r1c18f738693756ca1f0342c2cc158e32bc28f90b -raa873f8620e3f402bf60827e9c54623b5e09280e --- sources/view/settings/VDateTime.cpp (.../VDateTime.cpp) (revision 1c18f738693756ca1f0342c2cc158e32bc28f90b) +++ sources/view/settings/VDateTime.cpp (.../VDateTime.cpp) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) @@ -215,15 +215,33 @@ .arg(status(_acceptHD, _reasonHD)) .arg(status(_acceptDG, _reasonDG)) .arg(status(_acceptUI, _reasonUI)) - ); + ); } +void VDateTime::greeting(quint16 vMilitaryTime) +{ + if ( 0500 <= vMilitaryTime && vMilitaryTime < 1200 ) { + greeting(tr("Good Morning")); + return; + } + + if ( 1200 <= vMilitaryTime && vMilitaryTime < 1800 ) { + greeting(tr("Good Afternoon")); + return; + } + + greeting(tr("Good Evening")); +} + /*! * \brief VDateTime::timerEvent * \details The overloaded member function of the QObject to send the current date/time to the UI. * \note The interval has been set in _timerInterval as 1000 ms (1sec). */ void VDateTime::timerEvent(QTimerEvent *) { - current(QDateTime::currentDateTime().toString("MM/dd/yyyy HH:mm:ss")); + QDateTime datetime = QDateTime::currentDateTime(); + current(datetime.toString("MM/dd/yyyy HH:mm:ss")); + quint16 military = datetime.time().hour() * 100 + datetime.time().minute(); + greeting(military); } Index: sources/view/settings/VDateTime.h =================================================================== diff -u -re60d099fd4fbada632a974b9fc95d4d2c9652b1a -raa873f8620e3f402bf60827e9c54623b5e09280e --- sources/view/settings/VDateTime.h (.../VDateTime.h) (revision e60d099fd4fbada632a974b9fc95d4d2c9652b1a) +++ sources/view/settings/VDateTime.h (.../VDateTime.h) (revision aa873f8620e3f402bf60827e9c54623b5e09280e) @@ -80,11 +80,14 @@ PROPERTY(QString, status , "" ) PROPERTY(QString, current , "" ) + PROPERTY(QString, greeting , "" ) VIEW_DEC_CLASS(VDateTime) VIEW_DEC_SLOT (AdjustHDDateTimeResponseData) VIEW_DEC_SLOT (AdjustDGDateTimeResponseData) + void greeting(quint16 vMilitaryTime); + private slots: void onSetDateUIFinished(const int &vExitCode);