Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renpho smart bike r-q002 n (Issue #2401) (#2409) #2735

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading