Skip to content

Commit

Permalink
Resistance preset for rowers
Browse files Browse the repository at this point in the history
  • Loading branch information
cagnulein authored Oct 7, 2023
1 parent 24c0df5 commit 100eacc
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions src/homeform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1943,6 +1943,57 @@ void homeform::sortTiles() {
target_pace->setName("T.Pace(m/500m)");
dataList.append(target_pace);
}

if (settings
.value(QZSettings::tile_preset_resistance_1_enabled,
QZSettings::default_tile_preset_resistance_1_enabled)
.toBool() &&
settings.value(QZSettings::tile_preset_resistance_1_order,
QZSettings::default_tile_preset_resistance_1_order)
.toInt() == i) {
preset_resistance_1->setGridId(i);
dataList.append(preset_resistance_1);
}
if (settings
.value(QZSettings::tile_preset_resistance_2_enabled,
QZSettings::default_tile_preset_resistance_2_enabled)
.toBool() &&
settings.value(QZSettings::tile_preset_resistance_2_order,
QZSettings::default_tile_preset_resistance_2_order)
.toInt() == i) {
preset_resistance_2->setGridId(i);
dataList.append(preset_resistance_2);
}
if (settings
.value(QZSettings::tile_preset_resistance_3_enabled,
QZSettings::default_tile_preset_resistance_3_enabled)
.toBool() &&
settings.value(QZSettings::tile_preset_resistance_3_order,
QZSettings::default_tile_preset_resistance_3_order)
.toInt() == i) {
preset_resistance_3->setGridId(i);
dataList.append(preset_resistance_3);
}
if (settings
.value(QZSettings::tile_preset_resistance_4_enabled,
QZSettings::default_tile_preset_resistance_4_enabled)
.toBool() &&
settings.value(QZSettings::tile_preset_resistance_4_order,
QZSettings::default_tile_preset_resistance_4_order)
.toInt() == i) {
preset_resistance_4->setGridId(i);
dataList.append(preset_resistance_4);
}
if (settings
.value(QZSettings::tile_preset_resistance_5_enabled,
QZSettings::default_tile_preset_resistance_5_enabled)
.toBool() &&
settings.value(QZSettings::tile_preset_resistance_5_order,
QZSettings::default_tile_preset_resistance_5_order)
.toInt() == i) {
preset_resistance_5->setGridId(i);
dataList.append(preset_resistance_5);
}
}
} else if (bluetoothManager->device()->deviceType() == bluetoothdevice::ELLIPTICAL) {
for (int i = 0; i < 100; i++) {
Expand Down

0 comments on commit 100eacc

Please sign in to comment.