Index: sources/gui/qml/pages/MainStack.qml =================================================================== diff -u -r627b97843f87f5ca8fbd731c6c4a6d9fae4352ce -r11a7a3223f8405b6cfba01f8f684fadb2090e0cc --- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 627b97843f87f5ca8fbd731c6c4a6d9fae4352ce) +++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 11a7a3223f8405b6cfba01f8f684fadb2090e0cc) @@ -36,7 +36,7 @@ StackItem { id : _root // DEBUG: this property can mostly be used for debugging to get pass the initial screen - property var initialItem: vSettings.noCANBus ? _mainHome : _postModeScreen + property var initialItem: _postModeScreen stackView.initialItem : _root.initialItem @@ -117,7 +117,6 @@ MainHome { id: _mainHome onStartTreatment : { page( _treatmentStack )} onCreateTreatment : { vPreTreatmentAdjustmentInitTreatment.doInitiate() - // DEBUG: console.debug(vSettings.categorys) if ( vSettings.noCANBus ) vHDOperationMode.validateParametersChanged(true) } @@ -128,6 +127,23 @@ } } + Connections { target: vSettings + onNoCANBusChanged: { + //// DEBUG: + // console.debug("vSettings.noCANBus" , vSettings .noCANBus , + // "vHDOperationMode.init" , vHDOperationMode .init , + // "vHDOperationMode.fault" , vHDOperationMode .fault , + // "vHDOperationMode.opMode" , vHDOperationMode .opMode ) + if ( vSettings.noCANBus ) { + page( _mainHome , + vHDOperationMode.fault || // in fault mode + vHDOperationMode.init || // in initial post mode + vHDOperationMode.opMode === 0 // has not even been initialized , which most probably is the case. + ) + } + } + } + Connections { target: vHDOperationMode onIsTreatmentChanged : { if( visTreatment ) _mainMenu.isTreatment() } onIsManagerChanged : { if( visManager ) _mainMenu.isManager () }