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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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).
- 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
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)
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.
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.
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
- 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