Merge branch 'release/v22.3.3'
This commit is contained in:
@@ -1289,10 +1289,10 @@ def parsenonpainsled(fileformat, f2, summary, startdatetime='', empowerfirmware=
|
||||
# handle FIT
|
||||
if (fileformat == 'fit'): # pragma: no cover
|
||||
try:
|
||||
s = fitsummarydata(f2)
|
||||
s = FitSummaryData(f2)
|
||||
s.setsummary()
|
||||
summary = s.summarytext
|
||||
except:
|
||||
except Exception as e:
|
||||
pass
|
||||
hasrecognized = True
|
||||
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
@@ -582,12 +582,26 @@ def strokedata_fit(request):
|
||||
row = FP(fit_filename)
|
||||
|
||||
rowdata = rowingdata(df=row.df)
|
||||
duration = totaltime_sec_to_string(rowdata.duration)
|
||||
title = "ActiveSpeed water"
|
||||
|
||||
duration = totaltime_sec_to_string(rowdata.duration)
|
||||
distance = rowdata.df[" Horizontal (meters)"].iloc[-1]
|
||||
title = ""
|
||||
try:
|
||||
startdatetime = rowdata.rowdatetime
|
||||
startdate = startdatetime.date()
|
||||
partofday = part_of_day(startdatetime.hour)
|
||||
title = '{partofday} water'.format(partofday=partofday)
|
||||
except Exception as e:
|
||||
dologging('apilog.log','FIT error to get time')
|
||||
dologging('apilog.log',e)
|
||||
_ = myqueue(queuehigh, handle_sendemail_unrecognized, fit_filename, "fit parser")
|
||||
|
||||
w = Workout.objects.create(user=request.user.rower,
|
||||
duration=duration,
|
||||
name=title,)
|
||||
distance=distance,
|
||||
name=title,
|
||||
date=startdate,
|
||||
workouttype='water',)
|
||||
|
||||
uploadoptions = {
|
||||
'secret': UPLOAD_SERVICE_SECRET,
|
||||
@@ -598,7 +612,7 @@ def strokedata_fit(request):
|
||||
'title': title,
|
||||
'rpe': 0,
|
||||
'notes': '',
|
||||
'workoutid': w.id,
|
||||
'id': w.id,
|
||||
'offline': False,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user