diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.cpp b/src/ATBAPP/ATBDeviceControllerPlugin.cpp index 9e1f9eb..3727576 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.cpp +++ b/src/ATBAPP/ATBDeviceControllerPlugin.cpp @@ -87,9 +87,10 @@ PLUGIN_STATE ATBDeviceControllerPlugin::initDCPlugin(QObject *eventReceiver, con if (this->isMaster) { // open serial port hw->dc_openSerial(5, "115200", this->serialPortName, 1); - hw->dc_autoRequest(true); } + hw->dc_autoRequest(true); + hw->dc_setNewCustomerNumber(PTUSystem::readCustomerNumber()); hw->dc_setNewMachineNumber(PTUSystem::readMachineNumber()); hw->dc_setNewZone(PTUSystem::readZoneNumber()); @@ -176,20 +177,20 @@ void ATBDeviceControllerPlugin::reset() void ATBDeviceControllerPlugin::onChangedProgramModeToSELL() { + hw->dc_autoRequest(true); hw->rtc_setDateTime(); hw->mdb_switchWake(0); // wakeup MDB components } void ATBDeviceControllerPlugin::onChangedProgramModeToSERVICE() { - //hw->dc_autoRequest(true); + hw->dc_autoRequest(true); hw->mdb_switchWake(0); // wakeup MDB components } void ATBDeviceControllerPlugin::onChangedProgramModeToIDLE() { - //hw->dc_autoRequest(false); // <-- TODO: ??? - + hw->dc_autoRequest(true); this->diag->diagRequest(); hw->mdb_switchWake(1);