Index: alarmMapping.sh =================================================================== diff -u -r54c4136d95375116e6daf23b7d4179159cf13d0c -r45809f32e7c54277c75159ca6ce3143586c13ffb --- alarmMapping.sh (.../alarmMapping.sh) (revision 54c4136d95375116e6daf23b7d4179159cf13d0c) +++ alarmMapping.sh (.../alarmMapping.sh) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -15,7 +15,7 @@ # ############################################################################ ALARM_MAPPING=../scripts/build/alarmMapping -BRANCH="staging" +BRANCH=$(git symbolic-ref --short HEAD) if ( test -n "$1" ); then BRANCH="$1" fi Index: denali.pro =================================================================== diff -u -r5a7400c816e447ab2453ccb5b3bd5fbb09f4c72f -r45809f32e7c54277c75159ca6ce3143586c13ffb --- denali.pro (.../denali.pro) (revision 5a7400c816e447ab2453ccb5b3bd5fbb09f4c72f) +++ denali.pro (.../denali.pro) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -54,6 +54,7 @@ sources/cloudsync \ sources/abstract \ sources/model \ + sources/model/confirm \ sources/model/settings \ sources/model/ui/data \ sources/model/hd/adjustment \ @@ -76,6 +77,7 @@ sources/model/dg/adjustment \ sources/model/dg/adjustment/settings \ sources/view \ + sources/view/confirm \ sources/view/settings \ sources/view/pretreatment \ sources/view/ui/data \ @@ -125,6 +127,8 @@ sources/model/MAbstract.h \ sources/model/MAbstractDynamic.h \ sources/device/DeviceModels.h \ + \ # ---------- Models - confirm + sources/model/confirm/MDuetConfirmHDi.h \ \ # ---------- Models - POST sources/model/dg/data/post/MDGPostFinalResultData.h \ sources/model/dg/data/post/MDGPostSingleResultData.h \ @@ -262,9 +266,10 @@ sources/view/VTreatmentCreate.h \ sources/view/VEventSpy.h \ sources/view/VView.h \ - sources/view/VPowerOff.h \ sources/view/VGeneralEvent.h \ sources/device/DeviceView.h \ + \ # ---------- Views - CONFIRM + sources/view/confirm/VConfirm.h \ \ # ---------- Views - POST sources/view/dg/data/post/VDGPOSTData.h \ \ # ---------- Views - Settings @@ -378,7 +383,7 @@ sources/device/DeviceController.cpp \ sources/model/ui/data/MUIBloodPressureData.cpp \ sources/storage/Settings.cpp \ - sources/storage/TreatmentLog.cpp \ + sources/storage/TreatmentLog.cpp \ sources/view/hd/data/post/VHDPOSTData.cpp \ sources/wifi/WifiInterface.cpp \ sources/bluetooth/BluetoothInterface.cpp \ @@ -387,6 +392,8 @@ sources/model/MAbstract.cpp \ sources/model/MAbstractDynamic.cpp \ sources/device/DeviceModels.cpp \ + \ # ---------- Models - CONFIRM + sources/model/confirm/MDuetConfirmHDi.cpp \ \ # ---------- Models - POST sources/model/dg/data/post/MDGPostFinalResultData.cpp \ sources/model/dg/data/post/MDGPostSingleResultData.cpp \ @@ -513,9 +520,10 @@ \ # ---------- Views ---------- sources/view/VTreatmentCreate.cpp \ sources/view/VEventSpy.cpp \ - sources/view/VPowerOff.cpp \ sources/view/VGeneralEvent.cpp \ sources/device/DeviceView.cpp \ + \ # ---------- Views - CONFIRM + sources/view/confirm/VConfirm.cpp \ \ # ---------- Views - POST sources/view/dg/data/post/VDGPOSTData.cpp \ \ # ---------- Views - Alarm Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -r265ce7409a0ea99a4ae059f5ce7978c9cdb10631 -r45809f32e7c54277c75159ca6ce3143586c13ffb --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 265ce7409a0ea99a4ae059f5ce7978c9cdb10631) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -770,6 +770,20 @@ onActionTransmit(GuiActionType::ID_UIPostFinalResultData, mData); } +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the UI Generic User Confirmation result. + * \param vData - Data model contains the Generic User Confirmation result. + * \return void + */ +void MessageDispatcher::onAdjustment(const DuetConfirmUIrData &vData) +{ + QVariantList mData; + mData += vData.mId; + mData += vData.mConfirm; + onActionTransmit(GuiActionType::ID_DuetConfirmUIr, mData); +} + // ---------------------------------------------------------------------------------------------------- /*! Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r265ce7409a0ea99a4ae059f5ce7978c9cdb10631 -r45809f32e7c54277c75159ca6ce3143586c13ffb --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 265ce7409a0ea99a4ae059f5ce7978c9cdb10631) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -49,10 +49,14 @@ // but if the model still needs more the model will fail. // so it is better to keep them next to each other to make sure they are in sync. // ---- - {Gui::GuiActionType::ID_PowerOff , 1 }, + {Gui::GuiActionType::ID_PowerOff , 1 }, // 1 byte {Gui::GuiActionType::ID_ShuttingDown , 0 }, {Gui::GuiActionType::ID_KeepAlive , 255 }, // 0 => 255 to be able to run a multi-frame test. + // Generic Confirm + {Gui::GuiActionType::ID_DuetConfirmHDi , 3 * 4 }, // 3 parameters each 4bytes + {Gui::GuiActionType::ID_DuetConfirmUIr , 2 * 4 }, // 2 parameters each 4bytes + // POST {Gui::GuiActionType::ID_HDPostSingleResultData , 2 * 4 }, // 2 parameters each 4bytes {Gui::GuiActionType::ID_HDPostFinalResultData , 1 * 4 }, // 1 parameters each 4bytes Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r265ce7409a0ea99a4ae059f5ce7978c9cdb10631 -r45809f32e7c54277c75159ca6ce3143586c13ffb --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 265ce7409a0ea99a4ae059f5ce7978c9cdb10631) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -238,7 +238,8 @@ } LOG_EVENT_UI(QString("RawData")); break; - + // Generic Confirm + case Gui::GuiActionType::ID_DuetConfirmUIr : INTERPRET_TRANSMIT_MESSAGE(DuetConfirmUIrData ); break; case Gui::GuiActionType::ID_PowerOff : INTERPRET_TRANSMIT_MESSAGE(AdjustPowerOffRequestData ); break; // POST case Gui::GuiActionType::ID_UIPostFinalResultData : INTERPRET_TRANSMIT_MESSAGE(AdjustUIPostFinalResultRequestData ); break; @@ -434,6 +435,8 @@ case Gui::GuiActionType::ID_PowerOff : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PowerOff ); break; case Gui::GuiActionType::ID_ShuttingDown : ok = true; LOG_EVENT("HD,ShuttingDown"); /* TODO : implement notify<>() */ break; + case Gui::GuiActionType::ID_DuetConfirmHDi : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DuetConfirmHDi ); break; + // ----- POST case Gui::GuiActionType::ID_HDPostSingleResultData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDPostSingleResultData ); break; case Gui::GuiActionType::ID_HDPostFinalResultData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDPostFinalResultData ); break; Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -r265ce7409a0ea99a4ae059f5ce7978c9cdb10631 -r45809f32e7c54277c75159ca6ce3143586c13ffb --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 265ce7409a0ea99a4ae059f5ce7978c9cdb10631) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -28,6 +28,9 @@ #include "VHDPOSTData.h" #include "VDGPOSTData.h" +// Confirm +#include "VConfirm.h" + // Device #include "DeviceView.h" @@ -37,7 +40,6 @@ #include "VSettings.h" #include "VAlarmStatus.h" #include "VAlarmActiveList.h" -#include "VPowerOff.h" #include "VAdjustmentVersions.h" #include "VAdjustmentServiceMode.h" #include "VAdjustmentServiceDates.h" Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r265ce7409a0ea99a4ae059f5ce7978c9cdb10631 -r45809f32e7c54277c75159ca6ce3143586c13ffb --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 265ce7409a0ea99a4ae059f5ce7978c9cdb10631) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -78,6 +78,10 @@ ID_DGCheckIn = 0x0600, ID_KeepAlive = 0x0700, + // Generic Confirmation + ID_DuetConfirmHDi = 0xBA00, // 186 + ID_DuetConfirmUIr = 0xBB00, // 187 + // POST ID_HDPostSingleResultData = 0x8E00, // 142 ID_HDPostFinalResultData = 0x8F00, // 143 @@ -296,6 +300,10 @@ Q_ENUM(Request_Reject_Reasons) #include "HDDefs.h" + // Confirm + Q_ENUM(Generic_Confirm_Id) + Q_ENUM(Generic_Confirm_Command) + // Q_ENUM(HD_POST_States) Q_ENUM(HD_Op_Modes) Q_ENUM(HD_Standby_States) @@ -364,6 +372,9 @@ typedef GuiActions::Alarm_Data_Types GuiAlarmDataTypes; typedef GuiActions::Request_Reject_Reasons GuiRequestReasons; + // confirm + typedef GuiActions::Generic_Confirm_Id GuiConfirmId; + typedef GuiActions::Generic_Confirm_Command GuiConfirmCommand; // POST typedef GuiActions::HD_POST_States GuiHDPOSTStates; typedef GuiActions::DG_POST_States GuiDGPOSTStates; Index: sources/gui/qml/AlarmItem.qml =================================================================== diff -u -r265ce7409a0ea99a4ae059f5ce7978c9cdb10631 -r45809f32e7c54277c75159ca6ce3143586c13ffb --- sources/gui/qml/AlarmItem.qml (.../AlarmItem.qml) (revision 265ce7409a0ea99a4ae059f5ce7978c9cdb10631) +++ sources/gui/qml/AlarmItem.qml (.../AlarmItem.qml) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -53,6 +53,12 @@ // Alarms dialog/bar navigation handling ----- vvvvv ----- function alarmMinimize() { + // The has alarm check has been added here to let other components call this function, + // without worrying about the alarmDialog popoing up without an alarm present. + // Look at the PowerItem as an example. + if ( ! vAlarmStatus.hasAlarm ) return + + _alarmDialog .visible = false _alarmListDialog.visible = false _alarmBar .visible = true @@ -61,7 +67,7 @@ // The has alarm check has been added here to let other components call this function, // without worrying about the alarmDialog popoing up without an alarm present. // Look at the PowerItem as an example. - if ( ! vAlarmStatus.hasAlarm ) return; + if ( ! vAlarmStatus.hasAlarm ) return if ( _root._DEBUG_DISABLE_MAXIMIZE_ ) { alarmMinimize() Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r743b1bbe1b18908167d3f5f6f8b0d5c66cbe1295 -r45809f32e7c54277c75159ca6ce3143586c13ffb --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 743b1bbe1b18908167d3f5f6f8b0d5c66cbe1295) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -7,7 +7,7 @@ * * \file Variables.qml * \author (last) Behrouz NematiPour - * \date (last) 17-Feb-2022 + * \date (last) 28-Sep-2022 * \author (original) Behrouz NematiPour * \date (original) 09-Oct-2019 * @@ -76,6 +76,7 @@ readonly property int progressbarHeight : 30 readonly property int progressbarHandler : 35 + readonly property int progressbarHandlerBorderWidth : 4 readonly property int progressbarFluidHeight : 5 readonly property int progressbarSmall : 5 @@ -191,13 +192,13 @@ // - Artrial // - Artrial - Entire pressure value range readonly property int arterialValueMin : -400; ///< PRS362 const - readonly property int arterialValueMax : +600; ///< PRS362 const + readonly property int arterialValueMax : +100; ///< PRS362 const // - Artrial - Adjust pressure limit range and manufacturing default - Low readonly property int arterialLimitLowMin : -300; ///< PRS354 const - readonly property int arterialLimitLowMax : -30; ///< PRS354 const + readonly property int arterialLimitLowMax : +70; ///< PRS354 const // - Artrial - Adjust pressure limit range and manufacturing default - High readonly property int arterialLimitHighMin : -270; ///< PRS355 const - readonly property int arterialLimitHighMax : 0; ///< PRS355 const + readonly property int arterialLimitHighMax : +100; ///< PRS355 const // - Artrial - Adjust pressure limit resolution readonly property int arterialLimitStep : +10; ///< PRS354,PRS355 // has to be the same since it's on the same line scale readonly property int arterialLimitGap : +30; Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml =================================================================== diff -u -r265ce7409a0ea99a4ae059f5ce7978c9cdb10631 -r45809f32e7c54277c75159ca6ce3143586c13ffb --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision 265ce7409a0ea99a4ae059f5ce7978c9cdb10631) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -44,8 +44,6 @@ notificationText = "" } - // notification.iconVisible: false - header: Rectangle { id : _headerRect ConfirmButton { id : _confirmButton Index: sources/model/MModel.h =================================================================== diff -u -r265ce7409a0ea99a4ae059f5ce7978c9cdb10631 -r45809f32e7c54277c75159ca6ce3143586c13ffb --- sources/model/MModel.h (.../MModel.h) (revision 265ce7409a0ea99a4ae059f5ce7978c9cdb10631) +++ sources/model/MModel.h (.../MModel.h) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -30,6 +30,8 @@ #include "MAlarmActiveList.h" #include "MAdjustHDAlarmVolumeResponse.h" +#include "MDuetConfirmHDi.h" + // POST #include "MHDPostSingleResultData.h" #include "MHDPostFinalResultData.h" @@ -259,6 +261,9 @@ \details Registers the models in the Qt MetaType so it can be used in signal/slots between threads. */ #define REGISTER_MODEL_METATYPES \ + /* CONFIRM */ \ + REGISTER_METATYPE( DuetConfirmHDiData ) \ + REGISTER_METATYPE( DuetConfirmUIrData ) \ /* POST */ \ REGISTER_METATYPE( HDPostSingleResultData ) \ REGISTER_METATYPE( HDPostFinalResultData ) \ @@ -443,6 +448,8 @@ */ #define ACTION_RECEIVE_MODEL_BRIDGE_CONNECTIONS(vSOURCE) \ \ + /* CONFIRM */ \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DuetConfirmHDiData ) \ /* POST */ \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDPostSingleResultData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDPostFinalResultData ) \ @@ -551,6 +558,8 @@ // /* Request */ ---------------------------------------------------------// #define ADJUST_TRANSMT_MODEL_BRIDGE_CONNECTIONS(vSOURCE) \ + /* CONFIRM */ \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, DuetConfirmUIrData ) \ /* POST */ \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustUIPostFinalResultRequestData ) \ \ @@ -618,6 +627,8 @@ This macro should be used with its counterpart macro \ref ACTION_RECEIVE_MODEL_BRIDGE_CONNECTIONS */ #define ACTION_RECEIVE_MODEL_BRIDGE_DEFINITIONS \ + /* CONFIRM */ \ + ACTION_RECEIVE_BRIDGE_DEFINITION( DuetConfirmHDiData ) \ /* POST */ \ ACTION_RECEIVE_BRIDGE_DEFINITION( HDPostSingleResultData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( HDPostFinalResultData ) \ @@ -727,6 +738,8 @@ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS \ /* Request --------------------------------------------------------- */ \ + /* CONFIRM */ \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( DuetConfirmUIrData ) \ /* POST */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustUIPostFinalResultRequestData ) \ /* Post-Treatment */ \ @@ -778,6 +791,8 @@ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS_NOEMIT \ /* Request ----------------------- NoEmit -------------------------- */ \ + /* CONFIRM */ \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( DuetConfirmUIrData ) \ /* POST */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustUIPostFinalResultRequestData ) \ /* Post-Treatment */ \ @@ -829,6 +844,8 @@ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS_PUBLIC \ /* Request ----------------------- public -------------------------- */ \ + /* CONFIRM */ \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( DuetConfirmUIrData ) \ /* POST */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUIPostFinalResultRequestData ) \ /* Post-Treatment */ \ @@ -880,6 +897,8 @@ //== MessageInterpreter Signal Definition =======================================// #define ACTION_RECEIVE_SIGNALS \ + /* CONFIRM */ \ + ACTION_RECEIVE_SIGNAL( DuetConfirmHDiData ) \ /* POST */ \ ACTION_RECEIVE_SIGNAL( HDPostSingleResultData ) \ ACTION_RECEIVE_SIGNAL( HDPostFinalResultData ) \ Index: sources/view/VView.h =================================================================== diff -u -r265ce7409a0ea99a4ae059f5ce7978c9cdb10631 -r45809f32e7c54277c75159ca6ce3143586c13ffb --- sources/view/VView.h (.../VView.h) (revision 265ce7409a0ea99a4ae059f5ce7978c9cdb10631) +++ sources/view/VView.h (.../VView.h) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -102,6 +102,8 @@ #define REGISTER_VIEW_TYPES \ using namespace View; \ REGISTER_TYPE( VGeneralEvent ) \ + /* CONFIRM */ \ + REGISTER_TYPE( VConfirm ) \ /* POST */ \ REGISTER_TYPE( VHDPOSTData ) \ REGISTER_TYPE( VDGPOSTData ) \ @@ -119,8 +121,6 @@ /* Alarm */ \ REGISTER_TYPE( VAlarmStatus ) \ REGISTER_TYPE( VAlarmActiveList ) \ - /* Power off */ \ - REGISTER_TYPE( VPowerOff ) \ /* Treatment Common */ \ REGISTER_TYPE( VTreatmentVitals ) \ /* Data - States */ \ Index: sources/view/hd/alarm/VAlarmStatus.cpp =================================================================== diff -u -r265ce7409a0ea99a4ae059f5ce7978c9cdb10631 -r45809f32e7c54277c75159ca6ce3143586c13ffb --- sources/view/hd/alarm/VAlarmStatus.cpp (.../VAlarmStatus.cpp) (revision 265ce7409a0ea99a4ae059f5ce7978c9cdb10631) +++ sources/view/hd/alarm/VAlarmStatus.cpp (.../VAlarmStatus.cpp) (revision 45809f32e7c54277c75159ca6ce3143586c13ffb) @@ -151,6 +151,7 @@ alarm_Flag_alarmsCondition (vData.mFlags.at(GuiAlarmFlags::ALARM_STATE_FLAG_BIT_POS_TOP_CONDITION )); if (vData.mTop == GuiAlarmID::ALARM_ID_NO_ALARM) { + hasAlarm(false); emit didAlarmEmpty(); } else {