From 6e175dfb9129ee656197de790b97a561fc62ff4f Mon Sep 17 00:00:00 2001 From: ericchristoffersen <46055145+ericchristoffersen@users.noreply.github.com> Date: Tue, 28 May 2019 00:06:43 -0700 Subject: [PATCH] Raise slope limit to +-40. (#3092) --- src/Train/TrainSidebar.cpp | 4 ++-- src/Train/WorkoutWizard.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Train/TrainSidebar.cpp b/src/Train/TrainSidebar.cpp index c1ecea6f8..d7423d1fc 100644 --- a/src/Train/TrainSidebar.cpp +++ b/src/Train/TrainSidebar.cpp @@ -2375,7 +2375,7 @@ void TrainSidebar::Higher() else slope += 0.1; if (load >1500) load = 1500; - if (slope >15) slope = 15; + if (slope >40) slope = 40; if (status&RT_MODE_ERGO) foreach(int dev, activeDevices) Devices[dev].controller->setLoad(load); @@ -2401,7 +2401,7 @@ void TrainSidebar::Lower() else slope -= 0.1; if (load <0) load = 0; - if (slope <-10) slope = -10; + if (slope <-40) slope = -40; if (status&RT_MODE_ERGO) foreach(int dev, activeDevices) Devices[dev].controller->setLoad(load); diff --git a/src/Train/WorkoutWizard.cpp b/src/Train/WorkoutWizard.cpp index 2408a957a..57efbb35f 100644 --- a/src/Train/WorkoutWizard.cpp +++ b/src/Train/WorkoutWizard.cpp @@ -159,7 +159,7 @@ void WorkoutEditorGradient::insertDataRow(int row) // distance table->setItem(row,0,new WorkoutItemDouble()); // grade - table->setItem(row,1,new WorkoutItemDoubleRange<-20,20>()); + table->setItem(row,1,new WorkoutItemDoubleRange<-40,40>()); } /// Workout Summary @@ -548,7 +548,7 @@ void GradientPage::initializePage() metricUnits = hackContext->athlete->useMetricUnits; setTitle(tr("Workout Wizard")); - setSubTitle(tr("Manually create a workout based on gradient (slope) and distance, maximum grade is 5.")); + setSubTitle(tr("Manually create a workout based on gradient (slope) and distance, maximum grade is +-40.")); QHBoxLayout *layout = new QHBoxLayout(); setLayout(layout); @@ -666,10 +666,10 @@ void ImportPage::initializePage() spinGroupBox->setTitle(tr("Smoothing Parameters")); QLabel *gradeLabel = new QLabel(tr("Maximum Grade")); gradeBox = new QSpinBox(); - gradeBox->setValue(5); - gradeBox->setMaximum(20); - gradeBox->setMinimum(0); - gradeBox->setToolTip(tr("Maximum supported grade is 8")); + gradeBox->setValue(20); + gradeBox->setMaximum(40); + gradeBox->setMinimum(-40); + gradeBox->setToolTip(tr("Maximum supported grade is +-40")); connect(gradeBox,SIGNAL(valueChanged(int)),this,SLOT(updatePlot())); segmentBox = new QSpinBox();