Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement of the dragfactor calculation by using Linear TS estimator #159

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
246 commits
Select commit Hold shift + click to select a range
9422716
Redesign of the rowing engine (#84)
JaapvanEkris Dec 15, 2022
51400f2
Fixed a bug in tick rollover
JaapvanEkris Jan 10, 2023
6623aa2
Several bugfixes and improvements
JaapvanEkris Jan 10, 2023
062faa0
A bit more defensive programming
JaapvanEkris Jan 10, 2023
35ff348
Fixed a typo in function name
JaapvanEkris Jan 10, 2023
733720f
Expansion of the Interval type
JaapvanEkris Jan 10, 2023
b4e8f16
Improvement of code quality
JaapvanEkris Jan 11, 2023
11ff22e
Fixed a missing bracket
JaapvanEkris Jan 11, 2023
e29d723
Added sanity checks to the config manager
JaapvanEkris Jan 11, 2023
dc43c38
Improvement of code quality
JaapvanEkris Jan 11, 2023
0378f27
Fixed Lint errors
JaapvanEkris Jan 11, 2023
ce9294d
Centralising parameter check
JaapvanEkris Jan 11, 2023
3364ef3
Centralising parameter check
JaapvanEkris Jan 11, 2023
fb64547
Allowed the config check to repair settings
JaapvanEkris Jan 12, 2023
fcb3944
Removed some artificial limits
JaapvanEkris Jan 12, 2023
94a2aad
Added logic for more complex workouts
JaapvanEkris Jan 15, 2023
37edd02
Update to facilitate more complex workouts
JaapvanEkris Jan 15, 2023
1405b80
Removal of surplus logging line
JaapvanEkris Jan 15, 2023
e569637
Fixed a Lint error
JaapvanEkris Jan 15, 2023
758f2d2
Added Intervals.icu compatibility
JaapvanEkris Jan 15, 2023
f628a6e
Updates to fix review comments
JaapvanEkris Jan 15, 2023
75e2455
Added workout management to RowingStatistics
JaapvanEkris Jan 15, 2023
d67745c
Fixed Line error
JaapvanEkris Jan 15, 2023
7251a81
Douncheck with 0.8.4 settings
JaapvanEkris Jan 15, 2023
f1e7d08
Added restart limit to prevent bootloop
JaapvanEkris Jan 15, 2023
675c85c
Added restart limit to prevent bootloop
JaapvanEkris Jan 15, 2023
3695331
Move functionality to the Finite State Machine
JaapvanEkris Jan 16, 2023
6eed136
Move functionality to the Finite State Machine
JaapvanEkris Jan 16, 2023
3e2f954
Added paragraph about handle-based sensors
JaapvanEkris Jan 16, 2023
f7aae7b
Added reason to modify hardware setup
JaapvanEkris Jan 16, 2023
b473953
Added link to software setup
JaapvanEkris Jan 17, 2023
2e50a48
Added a list of known machines
JaapvanEkris Jan 17, 2023
89e5341
Added a link to supported rowers
JaapvanEkris Jan 17, 2023
47316d5
Creation to support users
JaapvanEkris Jan 17, 2023
0ba86d8
Fixed Lint errors
JaapvanEkris Jan 17, 2023
c82a977
Fixed a table error
JaapvanEkris Jan 17, 2023
704c2fa
Removed the Sportplus as an option
JaapvanEkris Jan 18, 2023
6e5089d
Update Supported_Rowers.md
JaapvanEkris Jan 18, 2023
60350f3
Added recommendation of OS Lite 64Bit
JaapvanEkris Jan 18, 2023
f737fdb
Fixed a bad example config
JaapvanEkris Jan 22, 2023
ca3dc3a
Added depiction of maximumTimeBetweenImpulses
JaapvanEkris Jan 27, 2023
2e3d6a4
Added an example of a bouncing sensor
JaapvanEkris Jan 27, 2023
198181d
Updated to help people further
JaapvanEkris Jan 27, 2023
0c90c18
Small wording changes
JaapvanEkris Jan 27, 2023
3edfe22
Refactor and restructure peripheral related code
Dec 12, 2022
7ef338d
Refactor heart rate peripherals
Dec 12, 2022
a3cd6e6
Add OFF mode to BLE peripheral and refactoring
Dec 17, 2022
17d6a74
Enable rotation of the heart rate monitor modes
Dec 18, 2022
3bb0229
Move to new ant-plus library
Dec 18, 2022
e938f5d
Fix app crash when bleMode is set to OFF initially
Dec 20, 2022
4f62b23
Add ANT+ profile manager
Dec 21, 2022
cd1ff3d
Fix crash when peripheral mode changed too quickly
Dec 21, 2022
a068615
Update button layout styling for the GUI
Dec 22, 2022
405bcab
Code cleanup
Jan 1, 2023
3530354
Fix error on simultaneous ANT peripheral startup
Jan 3, 2023
3f129ce
Add peripheral shutdown for app termination
Jan 3, 2023
aa3b39f
Change PM5 serial to comply with C2 standards
Feb 12, 2023
f28580f
Improvement of the stroke detection
JaapvanEkris Feb 14, 2023
3de19c0
Fixed a Lint error
JaapvanEkris Feb 14, 2023
674df2f
Added link to rower settings manual
JaapvanEkris Feb 14, 2023
bef0441
Added link to documentation
JaapvanEkris Feb 14, 2023
3e3cd7b
Added ANT+ functionality and BLE improvements
JaapvanEkris Feb 15, 2023
1cadf00
Added a description of the new ANT+ functionality
JaapvanEkris Feb 15, 2023
7b4a716
Added incyclist-ant-plus as dependency
JaapvanEkris Feb 15, 2023
1ae7128
Added missing dependencies
JaapvanEkris Feb 15, 2023
c029a42
Update to accommodate the new peripheral settings
JaapvanEkris Feb 15, 2023
765d975
Better description of stroke detection
JaapvanEkris Feb 21, 2023
f31372b
Better wording
JaapvanEkris Feb 21, 2023
025c41f
Update attribution.md
JaapvanEkris Feb 28, 2023
65b273b
Fixed Lint errors
JaapvanEkris Mar 1, 2023
97c1da9
Dealt with an edge case
JaapvanEkris Mar 2, 2023
bd97723
Cut/copy/paste error in log message
JaapvanEkris Mar 9, 2023
6aa5c69
Add force curve component
Mar 22, 2023
00d9c82
Create settings dialog and improve AppDialog
Mar 22, 2023
cac178f
Add settable metric tiles and settings persistence
Mar 22, 2023
28d223c
Add the ability to hide icons
Mar 22, 2023
457c96f
Fix webSocket address bug
Mar 22, 2023
6834e3a
Code refactoring and improve code consistency
Mar 23, 2023
fe5a7e7
Remove dependency on server formatted values
Mar 23, 2023
a4ef6d8
Show peak value in the force curve
Mar 23, 2023
89432fe
Expose app configs to the metric tile factory
Mar 24, 2023
5b44b88
Change `changeGuiSetting` event API
Mar 24, 2023
11db116
Remove global appState property
Mar 24, 2023
594f809
Change settings styling and fix a formatter bug
Mar 25, 2023
bf55638
Add new metric tiles
Mar 25, 2023
74a73c5
Add experimental 12 cell grid mode
Mar 25, 2023
c5bec08
Fix styling when text is used for metric tile
Mar 25, 2023
ee667d7
Prevent BLE HR monitor process crash (fixes: #135)
Mar 25, 2023
e7c4087
Fix HR battery level not showing (fixes: #132)
Mar 25, 2023
a1068cf
Fix type conversion in the curveMetrics
Mar 25, 2023
918c9b5
Remove formatting logic from RowingStatistics
Mar 25, 2023
b494be4
Fix bug re. ignoring app mode
Mar 25, 2023
475fe85
Clarification of minimumStrokeQuality
JaapvanEkris Apr 18, 2023
bc9dc83
Made position of createRawDataFiles clearer
JaapvanEkris Apr 18, 2023
dfc2881
Make changes to GUI to better support intervals
Apr 18, 2023
a2a8d60
Improve/rework GUI and fixed some bugs
JaapvanEkris Apr 19, 2023
c077089
Metric selection screen added
JaapvanEkris Apr 19, 2023
bb8cac9
Adopted to newly added GUI metrics
JaapvanEkris Apr 19, 2023
3c939cb
Added the GUI contributions
JaapvanEkris Apr 19, 2023
3f23f8d
Updated dependencies
JaapvanEkris Apr 19, 2023
9d8ffab
Hotfix for tests not running
Apr 19, 2023
78f6275
Hotfix for tests not running
JaapvanEkris Apr 19, 2023
d852ef8
Changed the trim of the distance
JaapvanEkris Apr 19, 2023
cbab40d
Improved procedure for the Pi Zero
JaapvanEkris Apr 21, 2023
8ef0e98
Added description of the Strava upload
JaapvanEkris Apr 21, 2023
de7d540
Improved wording
JaapvanEkris Apr 21, 2023
d6bcfaa
Added note about physics engine accuracy
JaapvanEkris Apr 21, 2023
c2f2c48
Added link to known rowers
JaapvanEkris Apr 21, 2023
2e48b96
Added Johnson JAR5100 to list
JaapvanEkris Apr 21, 2023
0dafc78
Updated Johnson JAR1500 status
JaapvanEkris Apr 21, 2023
3ef46ae
Fixed a typo
JaapvanEkris Apr 21, 2023
dd233f5
Updated the backlog
JaapvanEkris Apr 21, 2023
87a2279
Adoption to RowsAndAll timestamp spec change
JaapvanEkris Apr 21, 2023
597ec7c
Adoption to RowsAndAll timestamp spec change
JaapvanEkris Apr 22, 2023
d650ca5
Added HRR to the list
JaapvanEkris Apr 22, 2023
289c825
Updated info on the Concept2 Model C
JaapvanEkris Apr 23, 2023
41cee87
Fix for HRR data
JaapvanEkris Apr 23, 2023
b5e439c
Fixed typo's
JaapvanEkris Apr 24, 2023
52d491b
Added handling of the HRRecoveryUpdate
JaapvanEkris Apr 24, 2023
a72fe3f
Added interval number to RowingData
JaapvanEkris Apr 24, 2023
6baf81b
Improved consistency
JaapvanEkris Apr 24, 2023
d3cb82b
Added main architecture
JaapvanEkris Apr 27, 2023
c2effe4
Added the webclient
JaapvanEkris Apr 27, 2023
e9d495c
Update Architecture.md
JaapvanEkris Apr 27, 2023
505a486
Update Architecture.md
JaapvanEkris Apr 27, 2023
d447974
Update Architecture.md
JaapvanEkris Apr 27, 2023
82ae6ad
Update Architecture.md
JaapvanEkris Apr 27, 2023
4cad854
Update Architecture.md
JaapvanEkris Apr 27, 2023
57c9f85
Consolidation of terminology
JaapvanEkris Apr 27, 2023
c4aeb50
Update Architecture.md
JaapvanEkris Apr 27, 2023
f896a91
Fixes a timer bug, improves function naming
JaapvanEkris Apr 27, 2023
e1701f8
Fixes a timer bug, improves function naming
JaapvanEkris Apr 27, 2023
43d7e45
Fix a state machine bug
JaapvanEkris Apr 28, 2023
31fdb87
Fixes reset bug
JaapvanEkris Jul 4, 2023
43f337c
Fix a reset bug
JaapvanEkris Jul 4, 2023
26d41b8
Removed unneeded command
JaapvanEkris Jul 4, 2023
65ef9ac
Update physics_openrowingmonitor.md
JaapvanEkris Jul 17, 2023
c2c2e4b
Update Supported_Rowers.md
JaapvanEkris Sep 4, 2023
01a8fb7
Update Supported_Rowers.md
JaapvanEkris Sep 6, 2023
88a6d0f
Update Supported_Rowers.md
JaapvanEkris Sep 6, 2023
9e80bef
Fixed formula's
JaapvanEkris Oct 13, 2023
d70a2b3
Update physics_openrowingmonitor.md
JaapvanEkris Nov 21, 2023
576178e
Update physics_openrowingmonitor.md
JaapvanEkris Nov 21, 2023
499148f
Update physics_openrowingmonitor.md
JaapvanEkris Nov 21, 2023
b542535
Update Architecture.md
JaapvanEkris Nov 21, 2023
f342e66
Create BinarySearchTree.js
JaapvanEkris Dec 3, 2023
6681cfc
Create BinarySearchTree.test.js
JaapvanEkris Dec 3, 2023
f6573cb
Improvement of the FullTS performance
JaapvanEkris Dec 3, 2023
57cde02
Improvement of the FullTS performance
JaapvanEkris Dec 3, 2023
c1d365a
Adaptation to performance and accuracy improvements
JaapvanEkris Dec 3, 2023
9dc6f37
Addition of minimum and maximum functions
JaapvanEkris Dec 3, 2023
feac8c9
Addition of MinimumX, MinimumY, MaximumX and MaximumY functions
JaapvanEkris Dec 3, 2023
6eab88b
Update to adapt to improvements of FullTSQuadraticSeries
JaapvanEkris Dec 3, 2023
a557bef
Update Flywheel.js
JaapvanEkris Dec 3, 2023
8769a19
Update to accomodate FullTS improvements
JaapvanEkris Dec 3, 2023
d8b547f
Update to handle increased FullTS accuracy
JaapvanEkris Dec 3, 2023
8999539
Modification to reflect better FullTSQ algorithm
JaapvanEkris Dec 3, 2023
a00bb6e
Update to adapt to new flywheel-logic
JaapvanEkris Dec 3, 2023
f6c898f
Fix testing errors
JaapvanEkris Dec 3, 2023
88259a6
Fix of testing errors
JaapvanEkris Dec 3, 2023
6058871
Fix testing errors
JaapvanEkris Dec 3, 2023
9359e3f
Removed a design issue :)
JaapvanEkris Dec 3, 2023
6a9ec9a
Performance improvement
JaapvanEkris Dec 4, 2023
45e2f00
Improvement of the description of the drag calculation
JaapvanEkris Dec 28, 2023
3dd85b0
Change due to Theil-Sen improvement
JaapvanEkris Jan 3, 2024
e1ecfb4
Improved wording
JaapvanEkris Jan 5, 2024
db7d88b
implemented the Goodness of Fit indicator
JaapvanEkris Jan 8, 2024
8fb3668
Implemented the Goodness of Fit indicator
JaapvanEkris Jan 8, 2024
6a6c195
Fixed typo in addition assignment
JaapvanEkris Jan 8, 2024
5ea6de1
Update FullTSQuadraticSeries.js
JaapvanEkris Jan 8, 2024
ba2ab13
Creation of a Weighed series
JaapvanEkris Jan 9, 2024
ca436e2
Improvement of the calculation of the intercept
JaapvanEkris Jan 9, 2024
85a716c
Fixed a lint error
JaapvanEkris Jan 9, 2024
e0aabf4
Code cleanup and improvement
JaapvanEkris Jan 9, 2024
0e6de16
Improvement of flywheel velocity and acceleration algorithm
JaapvanEkris Jan 9, 2024
8f75076
Fixed lint errors
JaapvanEkris Jan 9, 2024
804ab5e
Fixed lint error
JaapvanEkris Jan 9, 2024
aecaa56
Update to reflect improved robustness
JaapvanEkris Jan 9, 2024
f6f9775
Adaptation to improved accuracy
JaapvanEkris Jan 9, 2024
0989a72
Adaptation to improved accuracy
JaapvanEkris Jan 9, 2024
4707df1
Adaptation to improved accuracy
JaapvanEkris Jan 9, 2024
cdf4411
Adaptation to improved accuracy
JaapvanEkris Jan 9, 2024
7287614
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
4ccf0b5
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
cfb2d66
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
c2e0960
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
9621d2f
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
3412ed8
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
9c47873
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
6bb2b9f
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
881999f
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
fcf1f73
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
2ea84d2
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
2ddb222
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
00adc3c
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
1b17b81
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
e42a471
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
23c6d69
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
2df7b72
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
4a01f5f
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 9, 2024
80c53af
Adaptation to improved Theil-Sen algorithm
JaapvanEkris Jan 10, 2024
3ccda4f
Create battery of tests for FullTSLinearSeries
JaapvanEkris Jan 10, 2024
b747b61
Update to allow installation on Debian 12 'Bookworm'
JaapvanEkris Jan 10, 2024
265a459
Fixed a bug in the install script
JaapvanEkris Jan 15, 2024
cb387a8
Explanation of the improvement
JaapvanEkris Jan 24, 2024
02fa529
Addition of the defaultValue property
JaapvanEkris Jan 24, 2024
b11a63a
Change to use Lin. TS for Drag calculation
JaapvanEkris Jan 24, 2024
28f4ba4
Fixed Lint error
JaapvanEkris Jan 24, 2024
43a9801
Improvement of the RowErg profile
JaapvanEkris Jan 24, 2024
97cfc04
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
657713d
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
7746f6e
Update Rower.test.js
JaapvanEkris Jan 24, 2024
e4141be
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
f39e130
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
0e806a2
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
1f4a2c2
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
b24daf8
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
635caa8
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
1ae811d
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
6f71948
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
5b0f50c
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
72e6166
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
381a44c
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
68c2e99
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
752b148
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
b041c3a
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
75644eb
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
eb59868
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
584d2ad
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
71c9696
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
59f5619
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
868dc0c
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
37cdef4
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
758743b
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
df7643e
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
ab7cd3e
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
3ab3116
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
59a842d
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
be273ac
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
9d9c38e
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
12cc5ad
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
4c2f762
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
b34c060
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
f9641b8
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
f474413
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
8abe799
Adaptation to improved drag calculation algorithm
JaapvanEkris Jan 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 0 additions & 63 deletions app/ant/AntManager.js

This file was deleted.

18 changes: 0 additions & 18 deletions app/ble/CentralService.js

This file was deleted.

91 changes: 0 additions & 91 deletions app/ble/PeripheralManager.js

This file was deleted.

18 changes: 0 additions & 18 deletions app/ble/ftms/DeviceInformationService.js

This file was deleted.

36 changes: 0 additions & 36 deletions app/ble/ftms/IndoorBikeFeatureCharacteristic.js

This file was deleted.

37 changes: 0 additions & 37 deletions app/ble/ftms/RowerFeatureCharacteristic.js

This file was deleted.

32 changes: 0 additions & 32 deletions app/ble/pm5/DeviceInformationService.js

This file was deleted.

22 changes: 18 additions & 4 deletions app/client/components/AppDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ export class AppDialog extends AppElement {
justify-content: center;
align-items: center;
}
button:hover {
button:hover:not(.disabled) {
filter: brightness(150%);
}

button.disabled {
filter: brightness(50%);
pointer: none
}

fieldset {
border: 0;
margin: unset;
Expand All @@ -67,20 +72,22 @@ export class AppDialog extends AppElement {
padding: 0;
}
`
@property({ type: Boolean })
isValid = true

@property({ type: Boolean, reflect: true })
dialogOpen

render () {
return html`
<dialog ${ref(this.dialog)} @close=${this.close}>
<form method="dialog">
<form >
<fieldset role="document">
<slot></slot>
</fieldset>
<menu>
<button value="cancel">Cancel</button>
<button value="confirm">OK</button>
<button formmethod="dialog" value="cancel">Cancel</button>
<button @click=${this.confirm} type="button" class="${this.isValid ? '' : 'disabled'}" value="confirm">OK</button>
</menu>
</form>
</dialog>
Expand All @@ -95,6 +102,13 @@ export class AppDialog extends AppElement {
}
}

confirm () {
if (this.isValid) {
this.close({ target: { returnValue: 'confirm' } })
this.dialogOpen = false
}
}

firstUpdated () {
this.dialog.value.showModal()
}
Expand Down
13 changes: 0 additions & 13 deletions app/client/components/AppElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,9 @@
*/

import { LitElement } from 'lit'
import { property } from 'lit/decorators.js'
import { APP_STATE } from '../store/appState.js'
export * from 'lit'

export class AppElement extends LitElement {
// this is how we implement a global state: a global state object is passed via properties
// to child components
@property({ type: Object })
appState = APP_STATE

// ..and state changes are send back to the root component of the app by dispatching
// a CustomEvent
updateState () {
this.sendEvent('appStateChanged', this.appState)
}

// a helper to dispatch events to the parent components
sendEvent (eventType, eventData) {
this.dispatchEvent(
Expand Down
Loading
Loading