@@ -1674,11 +1674,9 @@ Item {
16741674 }
16751675
16761676 component ToggleFloatingToolButton : FloatingToolButton {
1677+ property bool autonomous: true
16771678 property bool value: false
16781679
1679- signal toggleTrue
1680- signal toggleFalse
1681-
16821680 property Path trueIconPath
16831681 property Path falseIconPath
16841682 property Path trueFillIconPath
@@ -1688,10 +1686,8 @@ Item {
16881686 fillIconPath: value ? trueFillIconPath : falseFillIconPath
16891687
16901688 onClicked: {
1691- if (value) {
1692- toggleFalse();
1693- } else {
1694- toggleTrue();
1689+ if (autonomous) {
1690+ value = !value;
16951691 }
16961692 }
16971693 }
@@ -2283,6 +2279,7 @@ Item {
22832279 height: 0.8 * unit
22842280 visible: plot.showRecordDownload
22852281
2282+ autonomous: false
22862283 value: mainItem.state.extraRecording
22872284
22882285 customBgColor: value ? Utility.getAppHexColor("red") : Utility.getAppHexColor("normalBackground")
@@ -6173,39 +6170,68 @@ Item {
61736170 Layout.fillWidth: true
61746171 Layout.fillHeight: true
61756172
6176- Column {
6173+ ToggleFloatingToolButton {
6174+ id: toggleDataPlotButton
6175+ anchors.top: parent.top
6176+ anchors.right: parent.right
6177+ width: 0.8 * unit
6178+ height: 0.8 * unit
6179+ z: 1
6180+
6181+ trueIconPath: Path {
6182+ PathSvg {path: "M 6 13 L 31 13 M 6 21 L 21 21 M 6 29 L 21 29 M 6 37 L 21 37 M 29 21 L 44 21 M 29 29 L 44 29 M 29 37 L 44 37"}
6183+ }
6184+
6185+ falseIconPath: Path {
6186+ PathSvg {path: "M 10 12 L 10 38 L 42 38 M 10 30 L 22 22 L 32 28 L 39 18"}
6187+ }
6188+ }
6189+
6190+ ScrollView {
61776191 anchors.fill: parent
6178- anchors.margins: 5
6192+ contentWidth: availableWidth
6193+ clip: true
6194+ visible: !toggleDataPlotButton.value
61796195
6180- component Value : Item {
6181- implicitHeight: label.implicitHeight
6182- implicitWidth: parent.width
6196+ Column {
6197+ id: debugColumn
6198+ anchors.fill: parent
6199+ anchors.leftMargin: 0.15 * unit
6200+ anchors.rightMargin: 0.15 * unit
6201+ spacing: 5
61836202
6184- property string label
6185- property string value
6186- property string unit: ""
6203+ property real itemWidth: width * 0.5
6204+ property real labelWidth: itemWidth * 0.7
61876205
6188- NText {
6189- id: label
6190- anchors.right: parent.horizontalCenter
6191- anchors.top: parent.top
6192- font.pixelSize: fontSizeNormal
6193- text: "%1:".arg(parent.label)
6194- }
6206+ component Value : Item {
6207+ implicitHeight: label.implicitHeight
6208+ implicitWidth: debugColumn.itemWidth
61956209
6196- LText {
6197- anchors.left: label.right
6198- anchors.top: parent.top
6199- anchors.leftMargin: 3
6200- font.pixelSize: fontSizeNormal
6201- text: parent.value + parent.unit
6210+ property string label
6211+ property string value
6212+ property string unit: ""
6213+
6214+ NText {
6215+ id: label
6216+ width: debugColumn.labelWidth
6217+ anchors.left: parent.left
6218+ anchors.top: parent.top
6219+ font.pixelSize: fontSizeNormal
6220+ text: "%1:".arg(parent.label)
6221+ }
6222+
6223+ LText {
6224+ anchors.left: label.right
6225+ anchors.top: parent.top
6226+ font.pixelSize: fontSizeNormal
6227+ text: parent.value + parent.unit
6228+ }
62026229 }
6203- }
62046230
6205- Column {
6206- id: dataTopColumn
6207- width: parent.width
6208- spacing: 5
6231+ Item {
6232+ width: parent.width
6233+ height: 0.1 * unit
6234+ }
62096235
62106236 LText {
62116237 width: parent.width
@@ -6226,38 +6252,72 @@ Item {
62266252 text: state.errorDescription
62276253 }
62286254
6229- Value {id: debugLastBeepReason ; label: "Last Alert "; value: state.beepReasonString; visible: value; }
6230- Value {id: debugStopReason ; label: "Disengage Reason"; value: state.stopConditionString; visible: value; }
6255+ Value {id: debugStopReason ; label: "Stop Condition "; value: state.stopConditionString }
6256+ Value {id: debugLastBeepReason ; label: "Last Beep Reason"; value: state.beepReasonString }
62316257
62326258 Item {
6233- height: 0.1
62346259 width: parent.width
6260+ height: 0.1 * unit
62356261 }
6236- }
62376262
6238- Plot {
6239- id: rtPlot
6240- width: parent.width
6241- height: parent.height - dataTopColumn.height
6263+ Row {
6264+ width: parent.width
6265+
6266+ Column {
6267+ width: parent.width / 2
6268+ spacing: 5
6269+ clip: true
62426270
6243- followEnd: true
6244- maxWindowMinutes: preferences.plotMaxWindowMinutes
6271+ Value {label: "Requested current"; unit: "A"; value: toFixed2Zero(state.rtData["balance_current"]);}
6272+ Value {label: "Filtered current"; unit: "A"; value: toFixed2Zero(state.rtData["motor.filt_current"]);}
6273+ Value {label: "ATR Accel. diff."; value: toFixed2Zero(state.rtData["atr.accel_diff"]);}
6274+ Value {label: "ATR Speed Boost"; unit: "%"; value: round(state.rtData["atr.speed_boost"] * 100);}
6275+ Value {label: "Booster current"; unit: "A"; value: toFixed2Zero(state.rtData["booster.current"]);}
6276+ Value {label: "Remote input"; unit: "%"; value: round(state.rtData["remote.input"] * 100);}
6277+ }
6278+
6279+ Column {
6280+ width: parent.width / 2
6281+ spacing: 5
6282+ clip: true
62456283
6246- showRecordDownload: state.capDataRecord
6284+ Value {label: "ATR setpoint"; unit: "°"; value: toFixed2Zero(state.rtData["atr.setpoint"]);}
6285+ Value {label: "Brake Tilt setpoint"; unit: "°"; value: toFixed2Zero(state.rtData["brake_tilt.setpoint"]);}
6286+ Value {label: "Torque Tilt setpoint"; unit: "°"; value: toFixed2Zero(state.rtData["torque_tilt.setpoint"]);}
6287+ Value {label: "Turn Tilt setpoint"; unit: "°"; value: toFixed2Zero(state.rtData["turn_tilt.setpoint"]);}
6288+ Value {label: "Remote Tilt setpoint"; unit: "°"; value: toFixed2Zero(state.rtData["remote.setpoint"]);}
6289+ }
6290+ }
62476291
6248- plotData: PlotData {
6249- id: rtPlotData
6250- seriesMetaData: plotSeriesMetaData
6251- seriesExtraColors: plotSeriesExtraColors
6292+ Item {
6293+ width: parent.width
6294+ height: 0.1 * unit
62526295 }
6296+ }
6297+ }
6298+
6299+ Plot {
6300+ id: rtPlot
6301+ anchors.fill: parent
6302+ visible: toggleDataPlotButton.value
62536303
6254- Connections {
6255- target: state
6304+ followEnd: true
6305+ maxWindowMinutes: preferences.plotMaxWindowMinutes
62566306
6257- function onCommsInitialized() {
6258- rtPlotData.init(state.rtDataAllItems, state.ticksPerSecond);
6259- rtPlot.init(state.ticksPerSecond);
6260- }
6307+ showRecordDownload: state.capDataRecord
6308+
6309+ plotData: PlotData {
6310+ id: rtPlotData
6311+ seriesMetaData: plotSeriesMetaData
6312+ seriesExtraColors: plotSeriesExtraColors
6313+ }
6314+
6315+ Connections {
6316+ target: state
6317+
6318+ function onCommsInitialized() {
6319+ rtPlotData.init(state.rtDataAllItems, state.ticksPerSecond);
6320+ rtPlot.init(state.ticksPerSecond);
62616321 }
62626322 }
62636323 }
0 commit comments