From 2e8f77ad73c7c60092e0ea82a85724d94ce3abaf Mon Sep 17 00:00:00 2001 From: Jaap van Ekris <82339657+JaapvanEkris@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:00:46 +0100 Subject: [PATCH 1/6] Update install.sh --- install/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install.sh b/install/install.sh index ed226c7c69..d006091484 100755 --- a/install/install.sh +++ b/install/install.sh @@ -149,7 +149,7 @@ then sudo ln -sfn /opt/nodejs/bin/npm /usr/local/bin/npm else print "Installing Node.js..." - curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - + curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt-get install -y nodejs fi From 26e15f1c31cb7d183d45f0d1745bc4b5958ff677 Mon Sep 17 00:00:00 2001 From: Jaap van Ekris <82339657+JaapvanEkris@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:12:42 +0100 Subject: [PATCH 2/6] Create .npmrc --- .npmrc | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000000..2640e1df91 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +unsafe-perm=true +user=0 From 18df050599c54251badb097b754407dca692d9f4 Mon Sep 17 00:00:00 2001 From: Jaap van Ekris <82339657+JaapvanEkris@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:15:04 +0100 Subject: [PATCH 3/6] Update install.sh --- install/install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install/install.sh b/install/install.sh index d006091484..beba76601f 100755 --- a/install/install.sh +++ b/install/install.sh @@ -178,7 +178,10 @@ sudo git reset --hard origin/v1beta_updates echo "export PATH=\"\$PATH:$INSTALL_DIR/bin\"" >> ~/.bashrc # otherwise node-gyp would fail while building the system dependencies -sudo npm config set user 0 +# On newer nodejs versions (> Node 16) we solve this via the .npmrc file +if [[ $ARCHITECTURE == "armv6l" ]]; then + sudo npm config set user 0 +fi print print "Downloading and compiling Runtime dependencies..." From 84153a2d5a120412ed90d0b21b04bfa5cd0f1138 Mon Sep 17 00:00:00 2001 From: Jaap van Ekris <82339657+JaapvanEkris@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:28:30 +0100 Subject: [PATCH 4/6] Update server.js --- app/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server.js b/app/server.js index 7ca8ca61e6..6534a93000 100644 --- a/app/server.js +++ b/app/server.js @@ -303,7 +303,7 @@ function logMetrics (metrics) { /* replayRowingSession(handleRotationImpulse, { -// filename: 'recordings/2021/04/rx800_2021-04-21_1845_Rowing_30Minutes_Damper8.csv', // 30 minutes, damper 10 + filename: 'recordings/Concept2_RowErg_Session_2000meters.csv', // Example row from a Concept 2 RowErg, 2000 meters realtime: true, loop: false }) From 0918715327494fb8a7f0c76b130c16868611e41b Mon Sep 17 00:00:00 2001 From: Jaap van Ekris <82339657+JaapvanEkris@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:38:33 +0100 Subject: [PATCH 5/6] Update config.js --- install/config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/install/config.js b/install/config.js index 0f434d6da4..1b05522f6e 100644 --- a/install/config.js +++ b/install/config.js @@ -14,7 +14,6 @@ import rowerProfiles from './rowerProfiles.js' export default { - /* // example: change the default log level: loglevel: { default: 'debug' From 2a66bb54d54b4bffe21414d1e6d781cca069f084 Mon Sep 17 00:00:00 2001 From: Jaap van Ekris <82339657+JaapvanEkris@users.noreply.github.com> Date: Fri, 2 Feb 2024 22:35:07 +0100 Subject: [PATCH 6/6] Update RowingStatistics.js --- app/engine/RowingStatistics.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/engine/RowingStatistics.js b/app/engine/RowingStatistics.js index 0edc6f9f7e..3bdb0e4b0b 100644 --- a/app/engine/RowingStatistics.js +++ b/app/engine/RowingStatistics.js @@ -370,7 +370,7 @@ function createRowingStatistics (config) { } function getMetrics () { - const cyclePace = cycleLinearVelocity.clean() !== 0 && cycleLinearVelocity.raw() > 0 && sessionStatus === 'Rowing' ? (500.0 / cycleLinearVelocity.clean()) : Infinity + const cyclePace = cycleLinearVelocity.clean() !== 0 && sessionStatus === 'Rowing' ? (500.0 / cycleLinearVelocity.clean()) : Infinity return { sessiontype: intervalTargetDistance > 0 ? 'Distance' : (intervalTargetTime > 0 ? 'Time' : 'JustRow'), sessionStatus, @@ -391,8 +391,8 @@ function createRowingStatistics (config) { cycleDuration: cycleDuration.clean() > minimumStrokeTime && cycleDuration.clean() < maximumStrokeTime && cycleLinearVelocity.raw() > 0 && sessionStatus === 'Rowing' ? cycleDuration.clean() : NaN, // seconds cycleStrokeRate: cycleDuration.clean() > minimumStrokeTime && cycleLinearVelocity.raw() > 0 && sessionStatus === 'Rowing' ? (60.0 / cycleDuration.clean()) : 0, // strokeRate in SPM cycleDistance: cycleDistance.raw() > 0 && cycleLinearVelocity.raw() > 0 && sessionStatus === 'Rowing' ? cycleDistance.clean() : 0, // meters - cycleLinearVelocity: cycleLinearVelocity.clean() > 0 && cycleLinearVelocity.raw() > 0 && sessionStatus === 'Rowing' ? cycleLinearVelocity.clean() : 0, // m/s - cyclePace: cycleLinearVelocity.raw() > 0 ? cyclePace : Infinity, // seconds/50 0m + cycleLinearVelocity: cycleLinearVelocity.clean() > 0 && sessionStatus === 'Rowing' ? cycleLinearVelocity.clean() : 0, // m/s + cyclePace: cycleLinearVelocity.clean() > 0 && sessionStatus === 'Rowing' ? cyclePace : Infinity, // seconds/500m cyclePower: cyclePower.clean() > 0 && cycleLinearVelocity.raw() > 0 && sessionStatus === 'Rowing' ? cyclePower.clean() : 0, // watts cycleProjectedEndTime: intervalTargetDistance > 0 ? distanceOverTime.projectY(intervalTargetDistance) : intervalTargetTime, cycleProjectedEndLinearDistance: intervalTargetTime > 0 ? distanceOverTime.projectX(intervalTargetTime) : intervalTargetDistance,