Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -rd95ed86d997208024ec79422e350a86a2c52fd85 --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision d95ed86d997208024ec79422e350a86a2c52fd85) @@ -49,7 +49,6 @@ // 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 }, // 1 parameters each 4bytes {Gui::GuiActionType::ID_ShuttingDown , 0 }, {Gui::GuiActionType::ID_TDCheckIn , 0 }, //// ----- @LEAHIZED Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -rd95ed86d997208024ec79422e350a86a2c52fd85 --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision d95ed86d997208024ec79422e350a86a2c52fd85) @@ -219,7 +219,6 @@ // RO Water case Gui::GuiActionType::ID_DuetRoWaterModeUIi : INTERPRET_TRANSMIT_MESSAGE(DuetRoWaterModeUIiData ); break; // Power Off - case Gui::GuiActionType::ID_PowerOff : INTERPRET_TRANSMIT_MESSAGE(AdjustPowerOffRequestData ); break; // POST case Gui::GuiActionType::ID_UIPostFinalResultData : INTERPRET_TRANSMIT_MESSAGE(AdjustUIPostFinalResultRequestData ); break; // Settings @@ -463,7 +462,6 @@ // ----- Events case Gui::GuiActionType::ID_Acknow : ok = true; /* TODO : implement notify<>() */ break; - case Gui::GuiActionType::ID_PowerOff : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PowerOff ); break; case Gui::GuiActionType::ID_ShuttingDown : ok = true; LOG_APPED("HD,ShuttingDown"); /* TODO : implement notify<>() */ break; case Gui::GuiActionType::ID_DuetConfirmTDi : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DuetConfirmTDi ); break; Index: sources/gui/GuiController.cpp =================================================================== diff -u -rf2e4eba6e85c5d36537be782926f23cc9dc01037 -rd95ed86d997208024ec79422e350a86a2c52fd85 --- sources/gui/GuiController.cpp (.../GuiController.cpp) (revision f2e4eba6e85c5d36537be782926f23cc9dc01037) +++ sources/gui/GuiController.cpp (.../GuiController.cpp) (revision d95ed86d997208024ec79422e350a86a2c52fd85) @@ -193,25 +193,25 @@ // which does not require HD approval in GuiController // Process the GuiView Request. // It can be processed in GuiController take action and notify GuiView - switch (vAction) { - case GuiActionType::ID_PowerOff: - //qApp->quit(); +// switch (vAction) { +// case GuiActionType::ID_PowerOff: +// //qApp->quit(); - // GUI Controller decides (loop back) - //if (vData == GuiActionData::NoData){ - // // PowerOff noData is a request - // emit didActionReceive (vAction, GuiActionData::Accepted); - // return true; - //} - break; +// // GUI Controller decides (loop back) +// //if (vData == GuiActionData::NoData){ +// // // PowerOff noData is a request +// // emit didActionReceive (vAction, GuiActionData::Accepted); +// // return true; +// //} +// break; //case Another_Command_Which_does not_Require_HD_Approval: //return true; //break; - default: - break; +// default: +// break; - } +// } return false; } Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -rd95ed86d997208024ec79422e350a86a2c52fd85 --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision d95ed86d997208024ec79422e350a86a2c52fd85) @@ -127,7 +127,6 @@ ID_PostTreatmentStates = 0x770F, // 119 //// ----- @CRAPIZED: had to change to avoid duplication // ----- - ID_PowerOff = 0xB700, // 183 //// ----- @LEAHIZED ID_ShuttingDown = 0x0E0F, // 35 //// ----- @CRAPIZED: had to change to avoid duplication ID_TreatmentTime = 0x3B00, // 59 //// ----- @LEAHIZED ID_BloodFlow = 0x1100, // 17 //// ----- @LEAHIZED Index: sources/gui/qml/PowerItem.qml =================================================================== diff -u -rc66898d4ac69b72f1b9cc59e3039e7d9a1e59154 -rd95ed86d997208024ec79422e350a86a2c52fd85 --- sources/gui/qml/PowerItem.qml (.../PowerItem.qml) (revision c66898d4ac69b72f1b9cc59e3039e7d9a1e59154) +++ sources/gui/qml/PowerItem.qml (.../PowerItem.qml) (revision d95ed86d997208024ec79422e350a86a2c52fd85) @@ -120,13 +120,6 @@ else close () } - function onPoweroffTriggered ( vValue ) { - switch ( vValue ) { - case GuiActions.Command : open (); break; - case GuiActions.Timeout : close (); break; - case GuiActions.Rejected: reject(); break; - } - } function onAdjustmentTriggered ( vValue ) { // DEBUG: // console.debug('\n' + Index: sources/gui/qml/pages/settings/SettingsStack.qml =================================================================== diff -u -r72550dbbd6db8eab40aad38956b32f99416600c8 -rd95ed86d997208024ec79422e350a86a2c52fd85 --- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 72550dbbd6db8eab40aad38956b32f99416600c8) +++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision d95ed86d997208024ec79422e350a86a2c52fd85) @@ -168,7 +168,7 @@ _GuiView.doQuitApplication() } else { - _GuiView.doActionTransmit(GuiActions.ID_PowerOff, GuiActions.NoData) +// _GuiView.doActionTransmit(GuiActions.ID_PowerOff, GuiActions.NoData) } } itemsText : _root.itemsText Index: sources/model/MModel.h =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -rd95ed86d997208024ec79422e350a86a2c52fd85 --- sources/model/MModel.h (.../MModel.h) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/model/MModel.h (.../MModel.h) (revision d95ed86d997208024ec79422e350a86a2c52fd85) @@ -22,7 +22,6 @@ // models #include "MSettings.h" -#include "MAdjustPowerOff.h" #include "MAlarmStatusData.h" #include "MAlarmTriggered.h" #include "MAlarmCleared.h" @@ -366,7 +365,6 @@ REGISTER_METATYPE( OutletFlowData ) \ REGISTER_METATYPE( TreatmentTimeData ) \ REGISTER_METATYPE( PressureOcclusionData ) \ - REGISTER_METATYPE( PowerOffData ) \ REGISTER_METATYPE( TreatmentRangesData ) \ REGISTER_METATYPE( TreatmentSalineData ) \ REGISTER_METATYPE( TreatmentVitalsData ) \ @@ -604,7 +602,6 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, OutletFlowData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentTimeData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, PressureOcclusionData ) \ - ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, PowerOffData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentRangesData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentSalineData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentVitalsData ) \ @@ -853,7 +850,6 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( OutletFlowData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentTimeData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( PressureOcclusionData ) \ - ACTION_RECEIVE_BRIDGE_DEFINITION( PowerOffData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentRangesData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentSalineData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentVitalsData ) \ @@ -1234,7 +1230,6 @@ ACTION_RECEIVE_SIGNAL( OutletFlowData ) \ ACTION_RECEIVE_SIGNAL( TreatmentTimeData ) \ ACTION_RECEIVE_SIGNAL( PressureOcclusionData ) \ - ACTION_RECEIVE_SIGNAL( PowerOffData ) \ ACTION_RECEIVE_SIGNAL( TreatmentRangesData ) \ ACTION_RECEIVE_SIGNAL( TreatmentSalineData ) \ ACTION_RECEIVE_SIGNAL( TreatmentVitalsData ) \ Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -rd95ed86d997208024ec79422e350a86a2c52fd85 --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision d95ed86d997208024ec79422e350a86a2c52fd85) @@ -27,40 +27,6 @@ namespace Model { /*! - * Simple request models - * These are models to send the request for the doAdjustment - * The the only reason thy have been defined to help overloading the adjustment methods - * Otherwise the parameters are so tiny models. - */ - -/*! - * \brief The MAdjustPowerOffReq class - * \details The power off request model - * - * | MSG | CAN ID | Type | Ack | Src | Dst | Description | - * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | - * |0x0100| 0x020 | Cmd | N | UI | HD | Power Off | - * - * | Payload || - * | || - * | #1:(U08) | \ref state | - * - * - */ -class MAdjustPowerOffReq : public MModel { -public: - quint8 state; - QString toString() { - return toString({state}); - } - - explicit MAdjustPowerOffReq(quint8 vState) : state(vState) { } - static QString toString(const QVariantList &vParameters) { - return MModel::toString("PowerOff", vParameters); - } -}; - -/*! * \brief The MDuetConfirmUIr class * \details The confirm response model * @@ -812,7 +778,6 @@ } typedef Model:: MDuetConfirmUIr DuetConfirmUIrData; -typedef Model:: MAdjustPowerOffReq AdjustPowerOffRequestData; typedef Model:: MAdjustBloodDialysateReq AdjustBloodDialysateRequestData; typedef Model:: MAdjustDurationEditReq AdjustDurationEditRequestData; typedef Model:: MAdjustDurationConfirmReq AdjustDurationConfirmRequestData; Fisheye: Tag d95ed86d997208024ec79422e350a86a2c52fd85 refers to a dead (removed) revision in file `sources/model/td/adjustment/MAdjustPowerOff.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d95ed86d997208024ec79422e350a86a2c52fd85 refers to a dead (removed) revision in file `sources/model/td/adjustment/MAdjustPowerOff.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/view/confirm/VConfirm.cpp =================================================================== diff -u -rb9739918c71a21c181c8401f17ed05fb14996fec -rd95ed86d997208024ec79422e350a86a2c52fd85 --- sources/view/confirm/VConfirm.cpp (.../VConfirm.cpp) (revision b9739918c71a21c181c8401f17ed05fb14996fec) +++ sources/view/confirm/VConfirm.cpp (.../VConfirm.cpp) (revision d95ed86d997208024ec79422e350a86a2c52fd85) @@ -26,7 +26,6 @@ */ void View::VConfirm::initConnections() { ACTION_VIEW_CONNECTION(DuetConfirmTDiData ); - ACTION_VIEW_CONNECTION(PowerOffData ); ACTION_VIEW_CONNECTION(SettingsData ); ADJUST_VIEW_CONNECTION(DuetConfirmUIrData ); @@ -94,46 +93,12 @@ } /*! - * \brief View::VConfirm::setPowerOffCommand - */ -void View::VConfirm::setPowerOffCommand() -{ - command ( 0 ); - adjustment_Reason ( GuiConfirmId::GENERIC_CONFIRM_ID_NONE ); - adjustment_Accepted ( false ); // it has not been accepted yet. - isTimeout ( false ); - isReject ( false ); - isAccept ( false ); -} - -/*! - * \brief View::VConfirm::setPowerOffId - */ -void View::VConfirm::setPowerOffId() -{ - titleByID ( false ); - messageByID ( false ); - confirmByID ( false ); - cancelByID ( false ); - - title ( tr("Shutdown") ); - message ( tr("Are you sure you want to Shutdown?") ); - adjustment_Reason ( GuiConfirmId::GENERIC_CONFIRM_ID_NONE ); // power off has no rejection reason on the dialog - confirm ( tr("SHUTDOWN") ); - cancel ( tr("CANCEL") ); - - id ( 0 ); -} - -/*! * \brief VConfirm::onActionReceive * \details received response model data handler * \param vData - model data */ void View::VConfirm::onActionReceive(const DuetConfirmTDiData &vData) { - isPowerOff(false ); - setConfirmCommand ( vData ); setConfirmId ( vData ); @@ -144,22 +109,6 @@ // DEBUG: qDebug() << _id << _command << adjustment_Reason() << _title << _message << _isReject; } -void View::VConfirm::onActionReceive(const PowerOffData &vData) -{ - isPowerOff(true ); - - setPowerOffCommand ( ); - setPowerOffId ( ); - - poweroff(vData.mStatus); - - // *** has to be the last to let the information to be set and then emit the signal *** - // *** otherwise will use the Previous values before being set. *** - adjustment ( true ); - - // DEBUG: qDebug() << _id << _command << adjustment_Reason() << _title << _message << _isReject; -} - /*! * \brief View::VConfirm::doConfirm * \details the invocable slot to send user's Confirmation Index: sources/view/confirm/VConfirm.h =================================================================== diff -u -rb9739918c71a21c181c8401f17ed05fb14996fec -rd95ed86d997208024ec79422e350a86a2c52fd85 --- sources/view/confirm/VConfirm.h (.../VConfirm.h) (revision b9739918c71a21c181c8401f17ed05fb14996fec) +++ sources/view/confirm/VConfirm.h (.../VConfirm.h) (revision d95ed86d997208024ec79422e350a86a2c52fd85) @@ -20,7 +20,6 @@ #include "main.h" // Doxygen : do not remove #include "VAdjustmentResponseBase.h" #include "MDuetConfirmTDi.h" -#include "MAdjustPowerOff.h" #include "MSettings.h" namespace View { @@ -60,9 +59,6 @@ PROPERTY(quint32 , id , 0) PROPERTY(quint32 , command , 0) - TRIGGER( quint8 , poweroff , 0) - PROPERTY(bool , isPowerOff , 0) - PROPERTY(bool , isTimeout , 0) PROPERTY(bool , isReject , 0) PROPERTY(bool , isAccept , 0) @@ -77,13 +73,8 @@ void setConfirmCommand (const DuetConfirmTDiData &vData); void setConfirmId (const DuetConfirmTDiData &vData); - void setPowerOffCommand (); - void setPowerOffId (); - - VIEW_DEC_CLASS (VConfirm ) VIEW_DEC_SLOT (DuetConfirmTDiData ) - VIEW_DEC_SLOT (PowerOffData ) VIEW_DEC_SLOT (SettingsData ) public slots: