Update to handle increased FullTS accuracy
Update to handle the increased FullTS accuracy: the FullTSQuadratic functions have increased accuracy and react quicker to changes, thus stroke detection has to be improved.
This commit is contained in:
parent
8769a19090
commit
d8b547f040
|
|
@ -55,8 +55,8 @@ function createRower (rowerSettings) {
|
||||||
break
|
break
|
||||||
case (_strokeState === 'WaitingForDrive' && flywheel.isPowered() && flywheel.isAboveMinimumSpeed()):
|
case (_strokeState === 'WaitingForDrive' && flywheel.isPowered() && flywheel.isAboveMinimumSpeed()):
|
||||||
// We change into the "Drive" phase since were waiting for a drive phase, and we see a clear force exerted on the flywheel
|
// We change into the "Drive" phase since were waiting for a drive phase, and we see a clear force exerted on the flywheel
|
||||||
// As we are not certain what caused the "WaitingForDrive", we explicitly start the flywheel maintaining metrics again
|
|
||||||
log.debug(`*** Rowing (re)started with a DRIVE phase at time: ${flywheel.spinningTime().toFixed(4)} sec`)
|
log.debug(`*** Rowing (re)started with a DRIVE phase at time: ${flywheel.spinningTime().toFixed(4)} sec`)
|
||||||
|
// As we are not certain what caused the "WaitingForDrive" (a fresh start or a restart after pause),, we explicitly start the flywheel maintaining metrics again
|
||||||
flywheel.maintainStateAndMetrics()
|
flywheel.maintainStateAndMetrics()
|
||||||
_strokeState = 'Drive'
|
_strokeState = 'Drive'
|
||||||
startDrivePhase()
|
startDrivePhase()
|
||||||
|
|
@ -235,18 +235,22 @@ function createRower (rowerSettings) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function cycleDuration () {
|
function cycleDuration () {
|
||||||
|
// ToDo: return 0 in the situation where the first cycle hasn't completed yet
|
||||||
return _cycleDuration
|
return _cycleDuration
|
||||||
}
|
}
|
||||||
|
|
||||||
function cycleLinearDistance () {
|
function cycleLinearDistance () {
|
||||||
|
// ToDo: return 0 in the situation where the first cycle hasn't completed yet
|
||||||
return _driveLinearDistance + _recoveryLinearDistance
|
return _driveLinearDistance + _recoveryLinearDistance
|
||||||
}
|
}
|
||||||
|
|
||||||
function cycleLinearVelocity () {
|
function cycleLinearVelocity () {
|
||||||
|
// ToDo: return 0 in the situation where the first cycle hasn't completed yet
|
||||||
return _cycleLinearVelocity
|
return _cycleLinearVelocity
|
||||||
}
|
}
|
||||||
|
|
||||||
function cyclePower () {
|
function cyclePower () {
|
||||||
|
// ToDo: return 0 in the situation where the first cycle hasn't completed yet
|
||||||
return _cyclePower
|
return _cyclePower
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue