Skip to content

Commit

Permalink
saving laps for jumprope #2381
Browse files Browse the repository at this point in the history
  • Loading branch information
cagnulein committed Jun 21, 2024
1 parent 4a23556 commit 4610685
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/homeform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4507,6 +4507,10 @@ void homeform::update() {
this->inclination->setSecondLine("");
this->stepCount->setValue(QString::number(stepCount, 'f', 0));

// Sequence of jumps resetted and number of jumps > 0, so i have to start a new lap
if(inclination == 0 && ((jumprope *)bluetoothManager->device())->JumpsCount.lapValue() > 0)
lapTrigger = true;

} else if (bluetoothManager->device()->deviceType() == bluetoothdevice::ELLIPTICAL) {

if (((elliptical *)bluetoothManager->device())->currentSpeed().value() > 2)
Expand Down
2 changes: 2 additions & 0 deletions src/qfit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ void qfit::save(const QString &filename, QList<SessionLine> session, bluetoothde
lapMesg.SetEventType(FIT_EVENT_TYPE_STOP);
lapMesg.SetMessageIndex(lap_index++);
lapMesg.SetLapTrigger(FIT_LAP_TRIGGER_DISTANCE);
if (type == bluetoothdevice::JUMPROPE)
lapMesg.SetRepetitionNum(session.at(i - 1).inclination);
lastLapTimer = sl.elapsedTime;
lastLapOdometer = sl.distance;

Expand Down

0 comments on commit 4610685

Please sign in to comment.