Commit Graph

154 Commits

Author SHA1 Message Date
Jaap van Ekris a72fe3f017
Added interval number to RowingData
Added the interval number to the RowingData, allowing RowingData to recognize the intervals.
2023-04-24 13:26:02 +02:00
Jaap van Ekris 52d491b5f2
Added handling of the HRRecoveryUpdate
Added handling of the HRRecoveryUpdate, which will add Recovery HeartRate to the tcx notes
2023-04-24 13:20:47 +02:00
Jaap van Ekris b5e439cd50
Fixed typo's 2023-04-24 10:26:39 +02:00
Jaap van Ekris 41cee87b6b
Fix for HRR data
Fixed the wrong definition of HRR data
2023-04-23 22:12:56 +02:00
Jaap van Ekris 597ec7c765
Adoption to RowsAndAll timestamp spec change
Adoption to RowsAndAll timestamp spec change for the ElapsedTime
2023-04-22 20:34:43 +02:00
Jaap van Ekris 87a22795e4
Adoption to RowsAndAll timestamp spec change
RowsAndAll changed the specification of the timestamp, which caused the total rowing time to be inaccurate.
2023-04-21 19:27:32 +02:00
Jaap van Ekris d852ef8439
Changed the trim of the distance
Changed the trimming (switching between meters and kilometers) of the distance from 10K to 100K, similar to the PM5 and convention of other rowing machines.
2023-04-19 23:42:51 +02:00
Abász 9d8ffabab0 Hotfix for tests not running
Due to the decorators used in the GUI code with lit which is not
supported natively by node the tests under helper.test.js return module
error. This commit fixes by refactoring the `simpleMetricFactory` method
to remove dependency on code using experimental decorators.
2023-04-19 22:20:07 +02:00
Abász dfc2881f36 Make changes to GUI to better support intervals
Change distance, timer and calories tile to change behaviour when
current workout is an interval session (i.e. not JustRow).
Expose data necessary for this in RowingStatistics. Remove miles option
from formatter.
2023-04-18 23:19:53 +02:00
Abász b494be4b9d Fix bug re. ignoring app mode
Refactor appMode setting so it becomes internal to the DashboardAction
component as it is not used anywhere else. This prevents exposing
unnecessary - essentially internal - state to the global appState.
2023-03-25 21:59:21 +01:00
Abász 918c9b53fa Remove formatting logic from RowingStatistics
Remove logic of formatting metrics in RowingStatistics and move these to
the consuming end (e.g. client).
2023-03-25 21:00:33 +01:00
Abász a1068cf77f Fix type conversion in the curveMetrics
Fix the string conversion of the curveMetrics and push the formatting
logic to the consumer that require this (eg. WorkoutRecorder). This
enables other consumers of curveMetrics to use non-rounded, "raw" data
instead of preformatted as well as avoid potential future bugs from the
type conversion.
2023-03-25 21:00:33 +01:00
Abász e7c40873cd Fix HR battery level not showing (fixes: #132)
Fix the HR battery level not showing on the HR metric tile (ANT and BLE)
For ANT handle case when BatteryLevel is not present only BatteryStatus.
BLE devices do not necessarily send battery level with all HR broadcast so
read the battery level on connect.
2023-03-25 21:00:33 +01:00
Abász ee667d727a Prevent BLE HR monitor process crash (fixes: #135)
In case of an uncaught exception in the BLE HR child process the process
would crash and not restart. Add code to catch these uncaught exceptions
to prevent such crash and enable code to continue.
2023-03-25 21:00:33 +01:00
Abász c5bec08ea9 Fix styling when text is used for metric tile 2023-03-25 21:00:33 +01:00
Abász 74a73c571a Add experimental 12 cell grid mode
Implement 12 cell grid mode to show allow showing more metrics.
Experimental means that this layout will not render properly on every
screen size (though should work on bigger screens well).
That would require more media queries and css logic to tweak the styling
This may be implemented at a later stage.
2023-03-25 21:00:33 +01:00
Abász bf55638e82 Add new metric tiles
- Add drag factor (int)
- Add distance per stroke (meters with 1 decimal place)
- Add drive length (meters with 2 decimal places)
- Add drive duration (seconds with 2 decimal places)
- Add recovery duration (seconds with 2 decimal places)
2023-03-25 21:00:33 +01:00
Abász 594f8099c3 Change settings styling and fix a formatter bug 2023-03-25 21:00:33 +01:00
Abász 11db116f5e Remove global appState property
Remove appState property from the base class to avoid property drilling.
Expose full appState to those components only that really need it in
order to decouple dependency on global objects to prevent potential
future issues when refactoring and making changes.
2023-03-24 22:02:12 +01:00
Abász 5b44b88c39 Change `changeGuiSetting` event API
Restrict the event payload to data this component is responsible for and
handle immutable object construction at the main event handler side.
2023-03-24 22:02:12 +01:00
Abász 89432fef99 Expose app configs to the metric tile factory
Make all settings available to the metric creator factory in order for
subcomponents (e.g DashboardAction) to use it without depending directly
on the global appState.
2023-03-24 22:02:03 +01:00
Abász a4ef6d86b0 Show peak value in the force curve
Add the capability of showing the peak value for the handle force curve
2023-03-23 23:20:00 +01:00
Abász fe5a7e7ed1 Remove dependency on server formatted values
Remove dependency on metric formatting logic at the server. Implement
the formatting of the raw data on the client side. Make adding
new metric tiles more modular and extensible via simplified creation API
2023-03-23 19:03:27 +01:00
Abász 6834e3a558 Code refactoring and improve code consistency 2023-03-23 19:03:01 +01:00
Abász 457c96fe3c Fix webSocket address bug 2023-03-22 20:21:28 +01:00
Abász 28d223c109 Add the ability to hide icons
Implement GUI setting to hide icons in exchange for increased font size
(implements: #131)
2023-03-22 15:02:16 +01:00
Abász cac178f06d Add settable metric tiles and settings persistence
Make the metric tiles settable via the settings dialog and implement
persistence of these settings to the browser localStorage (partially
fix #131)
2023-03-22 13:44:34 +01:00
Abász 00d9c824d0 Create settings dialog and improve AppDialog
Update AppDialog to be able to handle invalid forms, and implement the
settings dialog that communicates via appState
2023-03-22 13:34:27 +01:00
Abász 6aa5c696c6 Add force curve component
Add a component that shows the force curve of the last drive in a chart.
2023-03-22 12:54:33 +01:00
Jaap van Ekris bd97723f8b
Cut/copy/paste error in log message 2023-03-09 10:55:45 +01:00
Jaap van Ekris 97c1da96d6
Dealt with an edge case
Dealt with an edge case where there are no strokes detected, but a number of impulses is recorded (Typically during first calibration).
2023-03-02 11:25:20 +01:00
Jaap van Ekris c029a42d37
Update to accommodate the new peripheral settings
Update to respect new peripheral settings introduced with the new peripheralmanager
2023-02-15 16:53:54 +01:00
Jaap van Ekris 3e3cd7b838
Added ANT+ functionality and BLE improvements
Extend ANT+ peripherals and redesign inner structure of the peripheral management
2023-02-15 14:28:39 +01:00
Abász aa3b39f86a Change PM5 serial to comply with C2 standards
The PM5 serial number should start with "43" (in line with consistent HW
and SW revision)
2023-02-12 22:55:26 +01:00
Abász 3f129ceec2 Add peripheral shutdown for app termination
In order to avoid errors with peripheral processes on the next startup
(e.g. ANT Stick getting stuck) graceful explicit shutdown of these is
necessary on app termination.
2023-02-12 22:52:02 +01:00
Abász 35303547e2 Fix error on simultaneous ANT peripheral startup
Move the peripheral startup sequence to an async function to ensure
proper startup order and to avoid multiple simultaneous calls to the
ANT stick causing app crash.
2023-02-12 22:40:16 +01:00
Abász 405bcab55a Code cleanup
Change logging level for the broadcast data of the ANT+ FE peripheral.
Fix callback signature mismatch in bleno `stopAdvertising()` method
2023-02-12 22:40:16 +01:00
Abász a0686150a2 Update button layout styling for the GUI
Restyle the button layout to be responsive and fix potential overflows
2023-02-12 22:40:16 +01:00
Abász cd1ff3d001 Fix crash when peripheral mode changed too quickly
Add boolean guard flag to fix potential crash when user clicks the
peripheral change buttons without waiting for the first request to
complete in the GUI (i.e. clicks too quickly).
2023-02-12 22:40:16 +01:00
Abász 4f62b2322e Add ANT+ profile manager
- Implement an ANT+ profile manager similar to BLE
- Implement ANT+ Fitness Equipment profile to be able to broadcast data
- Add button to the UI to scroll through the ANT+ profiles
2023-02-12 22:40:16 +01:00
Abász e938f5d8a0 Fix app crash when bleMode is set to OFF initially
Add guard clauses to notifyMetric call if bleMode is off.
Set blePeripheral and hrmPeripheral to undefined to avoid repeated call
to destroy() (i.e. calling destroy() on an already destroyed peripheral)
2023-02-12 22:40:16 +01:00
Abász 3bb0229d3a Move to new ant-plus library
Move to a new, still maintained, ant-plus library that solves the
connection dropout issue experienced with the original when using HRM as
well as that provides a cleaner interface to manage the ANT device.
2023-02-12 22:40:16 +01:00
Abász 17d6a74332 Enable rotation of the heart rate monitor modes
Add button to the GUI so the user can switch between heart rate monitor
modes (BLE, ANT, OFF). Update peripheralManager to handle switching and
implement necessary changes to the structure of the peripheralManager.
2023-02-12 22:40:16 +01:00
Abász a3cd6e6f39 Add OFF mode to BLE peripheral and refactoring
Add OFF mode to be able to turn BLE advertisement off. Rename
switchPeripheralMode function to include BLE in order to be more
descriptive.
2023-02-12 22:40:16 +01:00
Abász 7ef338d856 Refactor heart rate peripherals
Refactor ANT manager to be a central class managing the ANT stick state.
This state could be used for future implementation of other ANT profiles
and the peripheralManager should be responsible for creating once needed
2023-02-12 22:40:16 +01:00
Abász 3edfe22434 Refactor and restructure peripheral related code
- Create a new main folder to include ANT and BLE
- Move peripheralManager with other files with shared information
- Refactor static notify characteristics
- Refactor code to be more uniform across the different peripherals
2023-02-12 22:40:16 +01:00
Jaap van Ekris 6eed136caf
Move functionality to the Finite State Machine
On hindsight, the approach of letting the FSM handle all state transitions explicitly is much clearer
2023-01-16 12:18:46 +01:00
Jaap van Ekris 7251a8144d
Douncheck with 0.8.4 settings
Checked that the sanity check would fix all mew variables, allowing a 0.8.4 config file to be used with V1Beta without any crashes or issues.
2023-01-15 21:52:55 +01:00
Jaap van Ekris f628a6e791
Updates to fix review comments
Updates to fix review comments
2023-01-15 21:18:43 +01:00
Jaap van Ekris e5696378b0
Fixed a Lint error 2023-01-15 17:34:25 +01:00