Compare commits

...

20 Commits

Author SHA1 Message Date
Roberto Viola
867143e43e android 2.14.1 2023-07-24 21:01:32 +02:00
Roberto Viola
b85d7d72f5 2023 Sole F80 integration #1576 2023-07-24 11:00:17 +02:00
Roberto Viola
32cb3b9e37 2023 Sole F80 integration #1576 2023-07-24 10:19:24 +02:00
Roberto Viola
3ff8938b41 datetime tile now follow the locale of the user's system 2023-07-24 09:26:31 +02:00
Roberto Viola
5156cb38f0 adding virtual peloton bike to nordictrackadbbike 2023-07-24 06:26:19 +02:00
Roberto Viola
dd4a5dbc54 fixing hr on ios on ftmsbike 2023-07-24 06:25:58 +02:00
Roberto Viola
cf37b8705e fixing hr on ios on ftmsbike 2023-07-21 20:28:16 +02:00
Roberto Viola
bc8302c761 adding virtual peloton bike to nordictrackadbbike 2023-07-21 09:06:38 +02:00
Roberto Viola
76ecf5c66e adding virtual peloton bike to nordictrackadbbike 2023-07-21 09:03:31 +02:00
Roberto Viola
3693c2d1b2 v 2.14.0 2023-07-20 23:25:46 +02:00
Roberto Viola
3905bd8ba7 fixed peloton xml path 2023-07-20 23:12:21 +02:00
Roberto Viola
92cac7485e HR on iPad issue #1529 2023-07-20 16:34:15 +02:00
Roberto Viola
458c44758e Android QT Jars patched (#1575)
* Add files via upload

* adding only bluetooth one
2023-07-20 11:45:30 +02:00
Roberto Viola
be12859343 No charts when using floating window #1565 2023-07-19 09:53:21 +02:00
Roberto Viola
d201919b55 HR on iPad issue #1529 2023-07-19 09:38:07 +02:00
Roberto Viola
138a42c2e6 fixing CI build 2023-07-18 16:29:08 +02:00
Roberto Viola
bbe69f3f60 fixing build error 2023-07-18 16:02:50 +02:00
Roberto Viola
b95b3a5018 adding gears to wahookickrsnapbike as did for tacxneo
b443b03d49
2023-07-18 15:54:48 +02:00
Roberto Viola
fb0cbb74a5 adding smtp server info on the bottom of the email 2023-07-18 14:28:54 +02:00
Roberto Viola
deed6019ab adding restore purchase button for iOS guidelines 2023-07-18 14:28:33 +02:00
18 changed files with 127 additions and 36 deletions

View File

@@ -3666,7 +3666,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "../src/ios/qdomyos-zwift.entitlements";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 612;
CURRENT_PROJECT_VERSION = 620;
DEVELOPMENT_TEAM = 6335M7T29D;
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
@@ -3741,7 +3741,7 @@
/Users/cagnulein/Qt/5.15.2/ios/plugins/playlistformats,
/Users/cagnulein/Qt/5.15.2/ios/plugins/audio,
);
MARKETING_VERSION = 2.13;
MARKETING_VERSION = 2.14;
OTHER_CFLAGS = (
"-pipe",
"-g",
@@ -3834,7 +3834,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "../src/ios/qdomyos-zwift.entitlements";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 612;
CURRENT_PROJECT_VERSION = 620;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 6335M7T29D;
ENABLE_BITCODE = NO;
@@ -3911,7 +3911,7 @@
/Users/cagnulein/Qt/5.15.2/ios/plugins/playlistformats,
/Users/cagnulein/Qt/5.15.2/ios/plugins/audio,
);
MARKETING_VERSION = 2.13;
MARKETING_VERSION = 2.14;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"-pipe",
@@ -4038,7 +4038,7 @@
CODE_SIGN_ENTITLEMENTS = "watchkit Extension/WatchKit Extension.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 612;
CURRENT_PROJECT_VERSION = 620;
DEVELOPMENT_TEAM = 6335M7T29D;
ENABLE_BITCODE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -4063,7 +4063,7 @@
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MARKETING_VERSION = 2.13;
MARKETING_VERSION = 2.14;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_CODE_SIGN_FLAGS = "--generate-entitlement-der";
@@ -4134,7 +4134,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_ENTITLEMENTS = "watchkit Extension/WatchKit Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 612;
CURRENT_PROJECT_VERSION = 620;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 6335M7T29D;
ENABLE_BITCODE = YES;
@@ -4155,7 +4155,7 @@
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MARKETING_VERSION = 2.13;
MARKETING_VERSION = 2.14;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_CODE_SIGN_FLAGS = "--generate-entitlement-der";
@@ -4226,7 +4226,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_ENTITLEMENTS = "watchkit Extension/WatchKit Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 612;
CURRENT_PROJECT_VERSION = 620;
DEVELOPMENT_ASSET_PATHS = "\"watchkit Extension/Preview Content\"";
ENABLE_BITCODE = YES;
ENABLE_PREVIEWS = YES;
@@ -4271,7 +4271,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.13;
MARKETING_VERSION = 2.14;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_CODE_SIGN_FLAGS = "--generate-entitlement-der";
@@ -4340,7 +4340,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_ENTITLEMENTS = "watchkit Extension/WatchKit Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 612;
CURRENT_PROJECT_VERSION = 620;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "\"watchkit Extension/Preview Content\"";
ENABLE_BITCODE = YES;
@@ -4381,7 +4381,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.13;
MARKETING_VERSION = 2.14;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_CODE_SIGN_FLAGS = "--generate-entitlement-der";

Binary file not shown.

View File

@@ -93,7 +93,7 @@ Item {
onLinkActivated: Qt.openUrlExternally(link)
}
/*Button {
Button {
id: restoreButton
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
@@ -101,7 +101,8 @@ Item {
text: "Restore Purchases"
onClicked: {
console.log("restoring...");
toast.show("Restoring...");
iapStore.restorePurchases();
}
}*/
}
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<manifest package="org.cagnulen.qdomyoszwift" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:versionName="2.13.98" android:versionCode="614" android:installLocation="auto">
<manifest package="org.cagnulen.qdomyoszwift" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:versionName="2.14.1" android:versionCode="620" android:installLocation="auto">
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
<!-- %%INSERT_PERMISSIONS -->

View File

@@ -711,7 +711,8 @@ void bluetooth::deviceDiscovered(const QBluetoothDeviceInfo &device) {
this->signalBluetoothDeviceConnected(nordictrackifitadbTreadmill);
} else if (!tdf_10_ip.isEmpty() && !nordictrackifitadbBike) {
this->stopDiscovery();
nordictrackifitadbBike = new nordictrackifitadbbike(noWriteResistance, noHeartService);
nordictrackifitadbBike = new nordictrackifitadbbike(noWriteResistance, noHeartService,
bikeResistanceOffset, bikeResistanceGain);
emit deviceConnected(b);
connect(nordictrackifitadbBike, &bluetoothdevice::connectedAndDiscovered, this,
&bluetooth::connectedAndDiscovered);
@@ -1089,7 +1090,7 @@ void bluetooth::deviceDiscovered(const QBluetoothDeviceInfo &device) {
if (this->discoveryAgent && !this->discoveryAgent->isActive())
emit searchingStop();
this->signalBluetoothDeviceConnected(trueTreadmill);
} else if ((b.name().toUpper().startsWith(QStringLiteral("F80")) ||
} else if (((b.name().toUpper().startsWith(QStringLiteral("F80")) && sole_inclination) ||
b.name().toUpper().startsWith(QStringLiteral("F65")) ||
b.name().toUpper().startsWith(QStringLiteral("TT8")) ||
b.name().toUpper().startsWith(QStringLiteral("F63")) ||
@@ -1170,6 +1171,7 @@ void bluetooth::deviceDiscovered(const QBluetoothDeviceInfo &device) {
b.name().toUpper().startsWith(QStringLiteral("ASSAULTRUNNER")) || // FTMS
(b.name().toUpper().startsWith(QStringLiteral("CTM")) && b.name().length() >= 15) || // FTMS
(b.name().toUpper().startsWith(QStringLiteral("F85")) && !sole_inclination) || // FMTS
(b.name().toUpper().startsWith(QStringLiteral("F80")) && !sole_inclination) || // FMTS
b.name().toUpper().startsWith(QStringLiteral("ESANGLINKER"))) &&
!horizonTreadmill && filter) {
this->setLastBluetoothDevice(b);

View File

@@ -361,7 +361,7 @@ void ftmsbike::characteristicChanged(const QLowEnergyCharacteristic &characteris
#endif
{
if (Flags.heartRate && !disable_hr_frommachinery && newValue.length() > index) {
Heart = ((double)((newValue.at(index))));
Heart = ((double)(((uint8_t)newValue.at(index))));
// index += 1; // NOTE: clang-analyzer-deadcode.DeadStores
emit debug(QStringLiteral("Current Heart: ") + QString::number(Heart.value()));
} else {
@@ -551,7 +551,7 @@ void ftmsbike::characteristicChanged(const QLowEnergyCharacteristic &characteris
#endif
{
if (Flags.heartRate && !disable_hr_frommachinery && newValue.length() > index) {
Heart = ((double)((newValue.at(index))));
Heart = ((double)(((uint8_t)newValue.at(index))));
// index += 1; // NOTE: clang-analyzer-deadcode.DeadStores
emit debug(QStringLiteral("Current Heart: ") + QString::number(Heart.value()));
} else {

View File

@@ -760,7 +760,7 @@ void homeform::peloton_start_workout() {
if (!stravaPelotonActivityName.isEmpty() && !stravaPelotonInstructorName.isEmpty()) {
QString path = getWritableAppDir() + "training/" + workoutNameBasedOnBluetoothDevice() + "/" +
stravaPelotonInstructorName + "/";
QDir().mkdir(path);
QDir().mkpath(path);
lastTrainProgramFileSaved =
path + stravaPelotonActivityName.replace("/", "-") + " - " + stravaPelotonInstructorName + ".xml";
trainProgram->save(lastTrainProgramFileSaved);
@@ -3202,6 +3202,9 @@ void homeform::StopRequested() {
void homeform::Stop() {
QSettings settings;
m_startRequested = false;
qDebug() << QStringLiteral("Stop pressed - paused") << paused << QStringLiteral("stopped") << stopped;
if (stopped) {
@@ -3533,7 +3536,22 @@ void homeform::update() {
wattKg->setSecondLine(
QStringLiteral("AVG: ") + QString::number(bluetoothManager->device()->wattKg().average(), 'f', 1) +
QStringLiteral("MAX: ") + QString::number(bluetoothManager->device()->wattKg().max(), 'f', 1));
datetime->setValue(QTime::currentTime().toString(QStringLiteral("hh:mm:ss")));
QLocale locale = QLocale::system();
// Format the time based on the locale
QString timeFormat = locale.timeFormat(QLocale::ShortFormat);
bool usesAMPMFormat = timeFormat.toUpper().contains("A");
QDateTime currentTime = QDateTime::currentDateTime();
QString formattedTime;
if (usesAMPMFormat) {
// The locale uses 12-hour format with AM/PM
formattedTime = currentTime.toString("h:mm:ss AP");
} else {
// The locale uses 24-hour format
formattedTime = currentTime.toString("H:mm:ss");
}
datetime->setValue(formattedTime);
if (power5s)
watts = bluetoothManager->device()->wattsMetric().average5s();
else
@@ -5959,6 +5977,10 @@ void homeform::sendMail() {
}
}
#ifdef SMTP_SERVER
textMessage += QStringLiteral("\n\nSMTP server: ") + QString(STRINGIFY(SMTP_SERVER));
#endif
text.setText(textMessage);
message.addPart(&text);

View File

@@ -737,7 +737,7 @@ ApplicationWindow {
}
ItemDelegate {
text: "version 2.13.98"
text: "version 2.14.1"
width: parent.width
}

View File

@@ -13,7 +13,8 @@
using namespace std::chrono_literals;
nordictrackifitadbbike::nordictrackifitadbbike(bool noWriteResistance, bool noHeartService) {
nordictrackifitadbbike::nordictrackifitadbbike(bool noWriteResistance, bool noHeartService, uint8_t bikeResistanceOffset,
double bikeResistanceGain) {
QSettings settings;
bool nordictrack_ifit_adb_remote = settings.value(QZSettings::nordictrack_ifit_adb_remote, QZSettings::default_nordictrack_ifit_adb_remote).toBool();
m_watt.setType(metric::METRIC_WATT);
@@ -36,15 +37,29 @@ nordictrackifitadbbike::nordictrackifitadbbike(bool noWriteResistance, bool noHe
if (!firstStateChanged && !this->hasVirtualDevice()) {
bool virtual_device_enabled =
settings.value(QZSettings::virtual_device_enabled, QZSettings::default_virtual_device_enabled).toBool();
if (virtual_device_enabled) {
debug("creating virtual bike interface...");
auto virtualBike = new virtualbike(this);
connect(virtualBike, &virtualbike::changeInclination, this,
&nordictrackifitadbbike::changeInclinationRequested);
this->setVirtualDevice(virtualBike, VIRTUAL_DEVICE_MODE::PRIMARY);
firstStateChanged = 1;
#ifdef Q_OS_IOS
#ifndef IO_UNDER_QT
bool cadence =
settings.value(QZSettings::bike_cadence_sensor, QZSettings::default_bike_cadence_sensor).toBool();
bool ios_peloton_workaround =
settings.value(QZSettings::ios_peloton_workaround, QZSettings::default_ios_peloton_workaround).toBool();
if (ios_peloton_workaround && cadence) {
qDebug() << "ios_peloton_workaround activated!";
h = new lockscreen();
h->virtualbike_ios();
} else
#endif
#endif
if (virtual_device_enabled) {
qDebug() << QStringLiteral("creating virtual bike interface...");
auto virtualBike =
new virtualbike(this, noWriteResistance, noHeartService, bikeResistanceOffset, bikeResistanceGain);
// connect(virtualBike,&virtualbike::debug ,this,&echelonconnectsport::debug);
connect(virtualBike, &virtualbike::changeInclination, this, &nordictrackifitadbbike::changeInclination);
this->setVirtualDevice(virtualBike, VIRTUAL_DEVICE_MODE::PRIMARY);
}
}
firstStateChanged = 1;
// ********************************************************************************************************
#ifdef Q_OS_ANDROID
@@ -174,6 +189,11 @@ void nordictrackifitadbbike::processPendingDatagrams() {
// KCal = (((uint16_t)((uint8_t)newValue.at(15)) << 8) + (uint16_t)((uint8_t) newValue.at(14)));
Distance += ((Speed.value() / 3600000.0) *
((double)lastRefreshCharacteristicChanged.msecsTo(QDateTime::currentDateTime())));
if (Cadence.value() > 0) {
CrankRevs++;
LastCrankEventTime += (uint16_t)(1024.0 / (((double)(Cadence.value())) / 60.0));
}
lastRefreshCharacteristicChanged = QDateTime::currentDateTime();
@@ -188,6 +208,18 @@ void nordictrackifitadbbike::processPendingDatagrams() {
}
}
#ifdef Q_OS_IOS
#ifndef IO_UNDER_QT
bool cadencep = settings.value(QZSettings::bike_cadence_sensor, QZSettings::default_bike_cadence_sensor).toBool();
bool ios_peloton_workaround =
settings.value(QZSettings::ios_peloton_workaround, QZSettings::default_ios_peloton_workaround).toBool();
if (ios_peloton_workaround && cadencep && h && firstStateChanged) {
h->virtualbike_setCadence(currentCrankRevolutions(), lastCrankEventTime());
h->virtualbike_setHeartRate((uint8_t)metrics_override_heartrate());
}
#endif
#endif
emit debug(QStringLiteral("Current Watt: ") + QString::number(watts()));
emit debug(QStringLiteral("Current Resistance: ") + QString::number(Resistance.value()));
emit debug(QStringLiteral("Current Gear: ") + QString::number(gear));

View File

@@ -28,7 +28,8 @@
class nordictrackifitadbbike : public bike {
Q_OBJECT
public:
nordictrackifitadbbike(bool noWriteResistance, bool noHeartService);
nordictrackifitadbbike(bool noWriteResistance, bool noHeartService, uint8_t bikeResistanceOffset,
double bikeResistanceGain);
bool connected() override;
resistance_t pelotonToBikeResistance(int pelotonResistance) override;
bool inclinationAvailableByHardware() override;

View File

@@ -812,4 +812,4 @@ INCLUDEPATH += purchasing/inapp
WINRT_MANIFEST = AppxManifest.xml
VERSION = 2.13.98
VERSION = 2.14.1

View File

@@ -664,8 +664,9 @@ const QString QZSettings::fakedevice_rower = QStringLiteral("fakedevice_rower");
const QString QZSettings::zwift_ocr_climb_portal = QStringLiteral("zwift_ocr_climb_portal");
const QString QZSettings::poll_device_time = QStringLiteral("poll_device_time");
const QString QZSettings::proform_bike_PFEVEX71316_1 = QStringLiteral("proform_bike_PFEVEX71316_1");
const QString QZSettings::schwinn_bike_resistance_v3 = QStringLiteral("schwinn_bike_resistance_v3");
const uint32_t allSettingsCount = 556;
const uint32_t allSettingsCount = 557;
QVariant allSettings[allSettingsCount][2] = {
{QZSettings::cryptoKeySettingsProfiles, QZSettings::default_cryptoKeySettingsProfiles},
@@ -1228,6 +1229,7 @@ QVariant allSettings[allSettingsCount][2] = {
{QZSettings::zwift_ocr_climb_portal, QZSettings::default_zwift_ocr_climb_portal},
{QZSettings::poll_device_time, QZSettings::default_poll_device_time},
{QZSettings::proform_bike_PFEVEX71316_1, QZSettings::default_proform_bike_PFEVEX71316_1},
{QZSettings::schwinn_bike_resistance_v3, QZSettings::default_schwinn_bike_resistance_v3},
};
void QZSettings::qDebugAllSettings(bool showDefaults) {

View File

@@ -1863,6 +1863,9 @@ class QZSettings {
static const QString proform_bike_PFEVEX71316_1;
static constexpr bool default_proform_bike_PFEVEX71316_1 = false;
static const QString schwinn_bike_resistance_v3;
static constexpr bool default_schwinn_bike_resistance_v3 = false;
/**
* @brief Write the QSettings values using the constants from this namespace.
* @param showDefaults Optionally indicates if the default should be shown with the key.

View File

@@ -555,6 +555,8 @@ resistance_t schwinnic4bike::pelotonToBikeResistance(int pelotonResistance) {
QSettings settings;
bool schwinn_bike_resistance_v2 =
settings.value(QZSettings::schwinn_bike_resistance_v2, QZSettings::default_schwinn_bike_resistance_v2).toBool();
bool schwinn_bike_resistance_v3 =
settings.value(QZSettings::schwinn_bike_resistance_v3, QZSettings::default_schwinn_bike_resistance_v3).toBool();
if (!schwinn_bike_resistance_v2) {
if (pelotonResistance > 54)
return pelotonResistance;
@@ -563,6 +565,12 @@ resistance_t schwinnic4bike::pelotonToBikeResistance(int pelotonResistance) {
// y = 0,04x2 - 1,32x + 11,8
return ((0.04 * pow(pelotonResistance, 2)) - (1.32 * pelotonResistance) + 11.8);
} else if (schwinn_bike_resistance_v3) {
// y = 0,0007x3 - 0,0763x2 + 4,1619x - 75,788
if (pelotonResistance < 30)
return 0;
return qRound((0.0007 * pow(pelotonResistance, 3)) - (0.0763 * pow(pelotonResistance, 2)) + (4.1619 * pelotonResistance) - 75.788);
} else {
if (pelotonResistance > 20)
return (((double)pelotonResistance - 20.0) * 1.25);

View File

@@ -810,6 +810,7 @@ import QtQuick.Dialogs 1.0
// from version 2.13.99
property bool proform_bike_PFEVEX71316_1: false
property bool schwinn_bike_resistance_v3: false
}
function paddingZeros(text, limit) {
@@ -2214,7 +2215,7 @@ import QtQuick.Dialogs 1.0
}
SwitchDelegate {
id: schwinnBikeResistanceV2Delegate
text: qsTr("Resistance Alternative Calc.")
text: qsTr("Res. Alternative Calc. v2")
spacing: 0
bottomPadding: 0
topPadding: 0
@@ -2226,6 +2227,19 @@ import QtQuick.Dialogs 1.0
Layout.fillWidth: true
onClicked: settings.schwinn_bike_resistance_v2 = checked
}
SwitchDelegate {
text: qsTr("Res. Alternative Calc. v3")
spacing: 0
bottomPadding: 0
topPadding: 0
rightPadding: 0
leftPadding: 0
clip: false
checked: settings.schwinn_bike_resistance_v3
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
Layout.fillWidth: true
onClicked: settings.schwinn_bike_resistance_v3 = checked
}
RowLayout {
spacing: 10
Label {

View File

@@ -234,7 +234,10 @@ void wahookickrsnapbike::update() {
uint8_t b[20];
memcpy(b, a.constData(), a.length());
writeCharacteristic(b, a.length(), "setResistance", false, true);
} else if (virtualBike && virtualBike->ftmsDeviceConnected() && lastGearValue != gears()) {
inclinationChanged(lastGrade, lastGrade);
}
lastGearValue = gears();
requestResistance = -1;
}
if (requestStart != -1) {
@@ -789,8 +792,9 @@ void wahookickrsnapbike::controllerStateChanged(QLowEnergyController::Controller
void wahookickrsnapbike::inclinationChanged(double grade, double percentage) {
Q_UNUSED(percentage);
lastGrade = grade;
emit debug(QStringLiteral("writing inclination ") + QString::number(grade));
QByteArray a = setSimGrade(grade);
QByteArray a = setSimGrade(grade + gears());
uint8_t b[20];
memcpy(b, a.constData(), a.length());
writeCharacteristic(b, a.length(), "setSimGrade", false, true);

View File

@@ -83,6 +83,8 @@ class wahookickrsnapbike : public bike {
uint8_t sec1Update = 0;
QByteArray lastPacket;
double lastGearValue = -1;
double lastGrade = 0;
QDateTime lastRefreshCharacteristicChanged = QDateTime::currentDateTime();
QDateTime lastGoodCadence = QDateTime::currentDateTime();
uint8_t firstStateChanged = 0;

View File

@@ -7,7 +7,6 @@ class SoleF80TreadmillTestData : public BluetoothDeviceTestData {
public:
SoleF80TreadmillTestData() : BluetoothDeviceTestData("Sole F80") {
this->addDeviceName("F80", comparison::StartsWithIgnoreCase);
this->addDeviceName("F65", comparison::StartsWithIgnoreCase);
this->addDeviceName("S77", comparison::StartsWithIgnoreCase);
this->addDeviceName("TT8", comparison::StartsWithIgnoreCase);
@@ -40,6 +39,7 @@ class SoleF85TreadmillTestData : public BluetoothDeviceTestData {
public:
SoleF85TreadmillTestData() : BluetoothDeviceTestData("Sole F85 Treadmill") {
this->addDeviceName("F85", comparison::StartsWithIgnoreCase);
this->addDeviceName("F80", comparison::StartsWithIgnoreCase);
}
deviceType get_expectedDeviceType() const override { return deviceType::SoleF80Treadmill; }