Skip to content

Commit

Permalink
fixing maxing resistance
Browse files Browse the repository at this point in the history
  • Loading branch information
cagnulein committed Nov 4, 2024
1 parent 89db56a commit aa60db6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/devices/renphobike/renphobike.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ uint8_t renphobike::resistanceFromPowerRequest(uint16_t power)
}*/

double renphobike::bikeResistanceToPeloton(double resistance) {
/*
QSettings settings;
bool renpho_peloton_conversion_v2 =
settings.value(QZSettings::renpho_peloton_conversion_v2, QZSettings::default_renpho_peloton_conversion_v2)
Expand All @@ -736,7 +737,9 @@ double renphobike::bikeResistanceToPeloton(double resistance) {
if (p < 0)
p = 0;
return p;
}
}*/

return resistance * 4.0;
}

bool renphobike::connected() {
Expand Down
2 changes: 1 addition & 1 deletion src/devices/renphobike/renphobike.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class renphobike : public bike {
resistance_t maxResistance() override { return max_resistance; }

private:
const resistance_t max_resistance = 80;
const resistance_t max_resistance = 24;
double bikeResistanceToPeloton(double resistance);
void writeCharacteristic(uint8_t *data, uint8_t data_len, QString info, bool disable_log = false,
bool wait_for_response = false);
Expand Down

0 comments on commit aa60db6

Please sign in to comment.