Set serialPort name from config

This commit is contained in:
Siegfried Siegert 2023-05-02 17:39:38 +02:00
parent bbce2b02e3
commit 080c00eda1
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03

View File

@ -20,10 +20,10 @@ PLUGIN_STATE ATBDeviceControllerPlugin::initDCPlugin(QObject *healthEventReceive
{ {
this->healthEventReceiver = healthEventReceiver; this->healthEventReceiver = healthEventReceiver;
// Read a sample variable from setting // read variables from setting
QString sampleSetting = settings.value("DEVICE_CONTROLLER/sampleVariable", "defaultValue").toString(); QString serialPort = settings.value("DEVICE_CONTROLLER/serialPort", "ttymxc2").toString();
hw->dc_openSerial(5, "115200", "ttymxc2", 1); hw->dc_openSerial(5, "115200", serialPort, 1);
this->pluginState = PLUGIN_STATE::INITIALIZED; this->pluginState = PLUGIN_STATE::INITIALIZED;