Several bugfixes and improvements
Bugfix: Fixed a bug where a new year or month would crash the workoutrecorder due to a missing data directory Several improvements: * Added possibility of only creating RowingData file * Improved HRR data when restarting a workout
This commit is contained in:
parent
51400f2c02
commit
6623aa2f86
|
|
@ -87,6 +87,14 @@ function createWorkoutRecorder () {
|
|||
`"${currentstroke.driveHandleVelocityCurve}","${currentstroke.driveHandlePowerCurve}"\n`
|
||||
i++
|
||||
}
|
||||
|
||||
try {
|
||||
await fs.mkdir(directory, { recursive: true })
|
||||
} catch (error) {
|
||||
if (error.code !== 'EEXIST') {
|
||||
log.error(`can not create directory ${directory}`, error)
|
||||
}
|
||||
}
|
||||
await createFile(RowingData, `${filename}`, false)
|
||||
}
|
||||
|
||||
|
|
@ -270,7 +278,7 @@ function createWorkoutRecorder () {
|
|||
}
|
||||
|
||||
async function createRecordings () {
|
||||
if (!config.createRawDataFiles && !config.createTcxFiles) {
|
||||
if (!config.createRawDataFiles && !config.createTcxFiles && !config.createRowingDataFiles) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -279,6 +287,8 @@ function createWorkoutRecorder () {
|
|||
return
|
||||
}
|
||||
|
||||
postExerciseHR = []
|
||||
|
||||
const parallelCalls = []
|
||||
|
||||
if (config.createRawDataFiles) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue