diff options
author | Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com> | 2019-05-21 15:43:38 +0200 |
---|---|---|
committer | Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com> | 2019-05-22 09:37:54 +0000 |
commit | ea7df6b87afa89ea8f4d691426ffd98d5e693b15 (patch) | |
tree | 851b43baf9ea5d9882a2b145f83e649ebbe13242 /src/remotesettings | |
parent | 2a80a31749dc0e99ed0f686c47b65ec3b886b1ef (diff) |
[middleware] replace drivedata server with drivedata simulation server
- use simulation server instead of drivedata server
- remove the "fake" simulation in companion app as it uses
the simulation server currently
Change-Id: I9cb67572a7d50aa427d15ba923cb127d819de762
Reviewed-by: Egor Nemtsev <enemtsev@luxoft.com>
Diffstat (limited to 'src/remotesettings')
-rw-r--r-- | src/remotesettings/app/ClusterPage.qml | 65 |
1 files changed, 1 insertions, 64 deletions
diff --git a/src/remotesettings/app/ClusterPage.qml b/src/remotesettings/app/ClusterPage.qml index cbd2c230..edfb7157 100644 --- a/src/remotesettings/app/ClusterPage.qml +++ b/src/remotesettings/app/ClusterPage.qml @@ -39,8 +39,6 @@ Flickable { flickableDirection: Flickable.VerticalFlick contentHeight: baseLayout.height - property bool simulationEnabled: false - ScrollIndicator.vertical: ScrollIndicator { } ColumnLayout { @@ -84,6 +82,7 @@ Flickable { stepSize: 1.0 value: instrumentCluster.ePower onMoved: instrumentCluster.ePower = value + enabled: false Label { text: qsTr("ePower:") @@ -150,14 +149,6 @@ Flickable { } Label { - text: qsTr("Simulation Mode:") - } - CheckBox { - checked: root.simulationEnabled - onClicked: root.simulationEnabled = !root.simulationEnabled - } - - Label { text: qsTr("Hide Gauges:") } CheckBox { @@ -301,60 +292,6 @@ Flickable { to: 25000 onValueChanged: if (pressed) { instrumentCluster.navigationRouteDistanceKm = value } } - - Timer { - interval: 1000 - running: root.simulationEnabled - repeat: true - property int speedChange: 10 - onTriggered: { - if (instrumentCluster.speed > 140) { - speedChange = -10; - } - if (instrumentCluster.speed < 20) { - speedChange = 10; - } - instrumentCluster.speed += speedChange; - - if (instrumentCluster.ePower < 80) { - instrumentCluster.ePower = instrumentCluster.ePower + 2; - } else { - instrumentCluster.ePower = 0.0; - } - - if (instrumentCluster.speedCruise < 100) { - instrumentCluster.speedCruise = instrumentCluster.speedCruise + 10; - } else { - instrumentCluster.speedCruise = 0; - } - - if (instrumentCluster.mileageKm < 100000) { - instrumentCluster.mileageKm = instrumentCluster.mileageKm + Math.random(100) - } else { - instrumentCluster.mileageKm = 0 - } - - if (instrumentCluster.drivingModeRangeKm < 1000) { - instrumentCluster.drivingModeRangeKm = instrumentCluster.mileageKm + Math.random(20) - } else { - instrumentCluster.drivingModeRangeKm = 0 - } - - if (instrumentCluster.navigationProgressPercents < 1.0) { - instrumentCluster.navigationProgressPercents = instrumentCluster.navigationProgressPercents - + 0.01 - } else { - instrumentCluster.navigationProgressPercents = 0.0 - } - - if (instrumentCluster.navigationRouteDistanceKm < 130.0) { - instrumentCluster.navigationRouteDistanceKm = instrumentCluster.navigationRouteDistanceKm - + Math.random(10) - } else { - instrumentCluster.navigationRouteDistanceKm = 0.0 - } - } - } } GridLayout { |