Add interface for programmode switch

This commit is contained in:
2023-06-12 08:31:17 +02:00
parent 596cf3ed25
commit 668b10e55d
3 changed files with 38 additions and 4 deletions

View File

@@ -43,9 +43,6 @@ PLUGIN_STATE ATBDeviceControllerPlugin::initDCPlugin(QObject *healthEventReceive
QString serialPort = settings.value("DEVICE_CONTROLLER/serialPort", "ttymxc2").toString();
QByteArray printerEncoding = settings.value("DEVICE_CONTROLLER/printerEnconding", "ISO 8859-2").toString().toLatin1();
hw->dc_autoRequest(true);
// open serial port
hw->dc_openSerial(5, "115200", serialPort, 1);
@@ -61,6 +58,32 @@ PLUGIN_STATE ATBDeviceControllerPlugin::initDCPlugin(QObject *healthEventReceive
}
// Handle Mode-Changes --------------------------------------------------------
void ATBDeviceControllerPlugin::onChangedProgramModeToSELL()
{
hw->dc_autoRequest(true);
}
void ATBDeviceControllerPlugin::changedProgramModeToSERVICE()
{
hw->dc_autoRequest(true);
}
void ATBDeviceControllerPlugin::changedProgramModeToIDLE()
{
hw->dc_autoRequest(false);
}
void ATBDeviceControllerPlugin::changedProgramModeToOOO()
{
}
// TASKS: Cash handling -------------------------------------------------------
void ATBDeviceControllerPlugin::requestStartCashInput(const QString & amount)
{