From 016bc05247854fc832ae3b2e82d5cb2698173b17 Mon Sep 17 00:00:00 2001 From: Arseniy Movshev Date: Fri, 2 Jun 2023 00:51:46 +0100 Subject: Settings: add interval settings for heartrate and step counter --- src/SettingsPage.qml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src') diff --git a/src/SettingsPage.qml b/src/SettingsPage.qml index 567b5e0..993381f 100644 --- a/src/SettingsPage.qml +++ b/src/SettingsPage.qml @@ -45,6 +45,16 @@ Item { text: "Log step count" Component.onCompleted: checked = loggerSettings.stepCounterEnabled } + IntSelector { + id: stepsIntervalSelector + width: parent.width + height: width*0.25 + value: loggerSettings.stepCounterInterval/60000 + min: 5 + max: 60 + stepSize: 1 + unitMarker: "m" + } LabeledSwitch { id: hrEnableSwitch width: parent.width @@ -52,6 +62,16 @@ Item { text: "Log heart rate" Component.onCompleted: checked = loggerSettings.heartrateSensorEnabled } + IntSelector { + id: hrIntervalSelector + width: parent.width + height: width*0.25 + value: loggerSettings.heartrateSensorInterval/60000 + min: 5 + max: 60 + stepSize: 1 + unitMarker: "m" + } IconButton { iconName: "ios-checkmark-circle-outline" height: parent.width*0.2 @@ -59,7 +79,9 @@ Item { anchors.horizontalCenter: parent.horizontalCenter onClicked: { loggerSettings.stepCounterEnabled = stepsEnableSwitch.checked + loggerSettings.stepCounterInterval = stepsIntervalSelector.value*60000 loggerSettings.heartrateSensorEnabled = hrEnableSwitch.checked + loggerSettings.heartrateSensorInterval = hrIntervalSelector.value*60000 loggerSettings.reInitLogger() pageStack.pop(pageStack.currentLayer) } -- cgit v1.2.3-70-g09d2