summaryrefslogtreecommitdiff
path: root/daemon (follow)
AgeCommit message (Collapse)Author
2023-06-02Make sure we aren't writing to previous day if today file existsArseniy-Movshev
some other checks should also be put in place to make sure that we aren't decreasing the previous day's step count
2023-06-01Clean up log messagesArseniy-Movshev
2023-06-01Add a check for whether the daemon is starting the first time this bootArseniy-Movshev
2023-06-01Make sure we open files as readonly when we're reading them so we don't ↵Arseniy-Movshev
create random new files This shouldn't happen anyway, but this change helps avoid error conditions
2023-06-01Trigger a recording when the daemon startsArseniy-Movshev
2023-06-01step counter: Make sure that there's a time for the last record when sensor ↵Arseniy-Movshev
logger is constructed otherwise the next recording would assume that a midnight has passed and write bad values to the sensor
2023-06-01Move to resetting the sensor in hardwareArseniy-Movshev
The step counter is now set in hardware to the previous reading + any changes when the daemon starts This means that the step counter now just records the raw step counter value, and adjusts it correctly when needed This introduces a bug where the step counter will show bad readings if the daemon is restarted without a system reboot: the step counter's current value will be added to the last recorded value, which will cause the number of steps to effectively double in most situations. This might be fixed with some code to detect if a system reboot has passed since the last time the counter started.
2023-05-31Clear the step counter in hardware after midnightArseniy-Movshev
The midnight detection code is basic, it just checks if the date has changed between days. So that the user doesn't lose steps on their midnight outings, we write the current value to the previous day's log file before wiping the counter. This will always be the previous day, even if recordings have been missing for a few days.
2023-05-30Move overnight steps compensation code to the place where it's recordedArseniy-Movshev
2023-05-29Add a method for daemon recordings to be triggered from qmlArseniy-Movshev
This allows the app to always show an up-to-date value
2023-05-29Make sure step count doesn't duplicateArseniy-Movshev
this works in general, but won't work on devices such as catfish or medaka, which are able to count steps when the step counter isn't active. Those will need custom code in the future.
2023-05-28Make the log path configurableArseniy-Movshev
This also renames it to sensorlogd from the obsolete asteroid-healthtracker and hides it by default
2023-05-28Allow sensorlogd to set up its directory structureArseniy-Movshev
This code sets up all the paths used by sensorlogd before it is started
2023-05-28Add a new LoggerSettings typeArseniy-Movshev
this independently accesses the settings file for the logger, and has a call to reinitialise it (which will cause settings to be reread)
2023-05-28Add a dbus interface to allow reinitialising the loggerArseniy-Movshev
This is to allow the logger to be reinitialised form qml
2023-05-28Fix up the settings implementationArseniy-Movshev
add interval and enabled settings for all sensors get rid of some bad duplicates make sure that application properties are set up before settings are accessed
2023-05-26Add systemd services and rename executableArseniy-Movshev
2023-05-26Restructure to split to daemon and qml accessorArseniy-Movshev
- add separate subdirs for daemon and qml - add some generic qml boilerplate - add a really lazy 'last value' loader implementation - license the project as gplv3 (add copyright notices and license text)