Fix modbus data bits parsing and pop page after removing modbus RTU master
This commit is contained in:
parent
be09502da8
commit
783e2566d2
@ -94,7 +94,7 @@ SerialPort::SerialPortDataBits SerialPort::stringToSerialPortDataBits(const QStr
|
||||
} else if (dataBitsString == "SerialPortDataBitsData7") {
|
||||
return SerialPort::SerialPortDataBitsData7;
|
||||
} else if (dataBitsString == "SerialPortDataBitsData8") {
|
||||
return SerialPort::SerialPortDataBitsData7;
|
||||
return SerialPort::SerialPortDataBitsData8;
|
||||
}
|
||||
|
||||
return SerialPort::SerialPortDataBitsUnknownDataBits;
|
||||
|
||||
@ -51,8 +51,7 @@ SettingsPageBase {
|
||||
serialPortBaudrateModel: serialPortBaudrateModel,
|
||||
serialPortParityModel: serialPortParityModel,
|
||||
serialPortDataBitsModel: serialPortDataBitsModel,
|
||||
serialPortStopBitsModel: serialPortStopBitsModel
|
||||
})
|
||||
serialPortStopBitsModel: serialPortStopBitsModel })
|
||||
enabled: modbusRtuManager.supported
|
||||
}
|
||||
}
|
||||
@ -285,7 +284,7 @@ SettingsPageBase {
|
||||
d.pendingCommandId = -1
|
||||
if (modbusRtuManager.handleModbusError(error)) {
|
||||
// FIXME: the page does not work if I pop the page here
|
||||
//pageStack.pop()
|
||||
pageStack.pop()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -295,6 +294,29 @@ SettingsPageBase {
|
||||
text: qsTr("Information")
|
||||
}
|
||||
|
||||
// RowLayout {
|
||||
// Layout.fillWidth: true
|
||||
|
||||
// Led {
|
||||
// Layout.preferredHeight: Style.iconSize
|
||||
// Layout.preferredWidth: Style.iconSize
|
||||
// state: modbusRtuMaster ? (modbusRtuMaster.connected ? "on" : "red") : "red"
|
||||
// }
|
||||
|
||||
// Label {
|
||||
// Layout.fillWidth: true
|
||||
// text: modbusRtuMaster ? (modbusRtuMaster.connected ? qsTr("Connected") : qsTr("Disconnected")) : qsTr("Disconnected")
|
||||
// }
|
||||
// }
|
||||
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Connection status")
|
||||
subText: modbusRtuMaster && modbusRtuMaster.connected ? qsTr("Connected") : qsTr("Disconnected")
|
||||
progressive: false
|
||||
prominentSubText: false
|
||||
}
|
||||
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("UUID")
|
||||
@ -311,14 +333,6 @@ SettingsPageBase {
|
||||
prominentSubText: false
|
||||
}
|
||||
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Connection status")
|
||||
subText: modbusRtuMaster && modbusRtuMaster.connected ? qsTr("Connected") : qsTr("Disconnected")
|
||||
progressive: false
|
||||
prominentSubText: false
|
||||
}
|
||||
|
||||
NymeaSwipeDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Baud rate")
|
||||
|
||||
Reference in New Issue
Block a user