Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "347 keep settings up to date with gui v1" #392

Closed

Conversation

DanielMcInnes
Copy link
Contributor

Reverts #387

DanielMcInnes and others added 8 commits July 17, 2023 11:59
Add a switch to enable an alarm that triggers when the auto start function is
left disabled for more than 10 minutes.
The 'VRM Portal ID' now shows valid data instead of 'TODO'.
Settings -> Generator start / stop -> Settings -> Run time and service
When editing a ListTextField, we would write the new value to the data point,
then emit 'root.accepted(text)'.
This causes problems for ListTextFields where the secondary text is different
to the raw value of the DataPoint, such as the generator service interval,
where the DataPoint stores the value in seconds, and the secondary text is
presented in hours, as follows (elided for brevity):

ListTextField {
    id: serviceInterval

    text: qsTrId("page_settings_generator_service_interval")
    secondaryText: Math.round(dataValue / 60 / 60)
    dataSource: settingsBindPrefix + "/ServiceInterval"
    onAccepted: function(hours) {
        setDataValue(hours * 60 * 60)
    }
}

The user might change the service interval to 1000 hours. The data point gets
set to '1000'. The 'serviceInterval' object detects that the 'dataValue' has
changed, and updates the secondary text to 1000 / 60 / 60, i.e. 0.2, which gets
displayed as 0. ListTextField continues its 'onAccepted' routine, and emits
'root.accepted(text)', which is now equal to 0. The 'serviceInterval' object
runs 'onAccepted', and calls 'setDataValue(hours * 60 * 60)', which in this
case, is equal to 0.
This reverts commit 62f1e03.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants