mirror of
https://github.com/cagnulein/qdomyos-zwift.git
synced 2026-02-18 00:17:41 +01:00
Compare commits
1 Commits
Mobi-Rower
...
Click-and-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12920d10a8 |
@@ -99,6 +99,10 @@ bluetooth::bluetooth(bool logs, const QString &deviceName, bool noWriteResistanc
|
||||
discoveryAgent = new QBluetoothDeviceDiscoveryAgent(this);
|
||||
connect(discoveryAgent, &QBluetoothDeviceDiscoveryAgent::deviceDiscovered, this, &bluetooth::deviceDiscovered);
|
||||
|
||||
// Initialize Zwift device lists with "Auto" option
|
||||
zwiftClickDevicesList.append("Auto");
|
||||
zwiftPlayDevicesList.append("Auto");
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
connect(discoveryAgent, &QBluetoothDeviceDiscoveryAgent::deviceUpdated, this, &bluetooth::deviceUpdated);
|
||||
|
||||
@@ -644,6 +648,27 @@ void bluetooth::deviceDiscovered(const QBluetoothDeviceInfo &device) {
|
||||
}
|
||||
if (!found) {
|
||||
devices.append(device);
|
||||
|
||||
// Cache Zwift devices for ComboBox selection
|
||||
QString deviceName = device.name().toUpper();
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_OS_IOS)
|
||||
QString deviceAddress = device.deviceUuid().toString();
|
||||
#else
|
||||
QString deviceAddress = device.address().toString();
|
||||
#endif
|
||||
QString deviceDisplay = device.name() + " (" + deviceAddress + ")";
|
||||
|
||||
if (deviceName.startsWith("ZWIFT CLICK")) {
|
||||
if (!zwiftClickDevicesList.contains(deviceDisplay)) {
|
||||
zwiftClickDevicesList.append(deviceDisplay);
|
||||
emit zwiftClickDevicesChanged();
|
||||
}
|
||||
} else if (deviceName.startsWith("ZWIFT PLAY") || deviceName.startsWith("ZWIFT RIDE") || deviceName.startsWith("ZWIFT SF2")) {
|
||||
if (!zwiftPlayDevicesList.contains(deviceDisplay)) {
|
||||
zwiftPlayDevicesList.append(deviceDisplay);
|
||||
emit zwiftPlayDevicesChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3011,10 +3036,24 @@ void bluetooth::connectedAndDiscovered() {
|
||||
}
|
||||
|
||||
if(settings.value(QZSettings::zwift_click, QZSettings::default_zwift_click).toBool()) {
|
||||
QString zwiftClickName = settings.value(QZSettings::zwift_click_name, QZSettings::default_zwift_click_name).toString();
|
||||
for (const QBluetoothDeviceInfo &b : qAsConst(devices)) {
|
||||
if (((b.name().toUpper().startsWith("ZWIFT CLICK"))) && !zwiftClickRemote && this->device() &&
|
||||
this->device()->deviceType() == bluetoothdevice::BIKE) {
|
||||
|
||||
// Check MAC address filter if not "Auto"
|
||||
if (zwiftClickName != "Auto") {
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_OS_IOS)
|
||||
QString deviceAddress = b.deviceUuid().toString();
|
||||
#else
|
||||
QString deviceAddress = b.address().toString();
|
||||
#endif
|
||||
QString deviceDisplay = b.name() + " (" + deviceAddress + ")";
|
||||
if (deviceDisplay != zwiftClickName) {
|
||||
continue; // Skip this device if it doesn't match the selected one
|
||||
}
|
||||
}
|
||||
|
||||
if(b.manufacturerData(2378).size() > 0) {
|
||||
qDebug() << "this should be 9. is it? " << int(b.manufacturerData(2378).at(0));
|
||||
} else {
|
||||
@@ -3056,20 +3095,49 @@ void bluetooth::connectedAndDiscovered() {
|
||||
|
||||
if(settings.value(QZSettings::zwift_play, QZSettings::default_zwift_play).toBool()) {
|
||||
bool zwiftplay_swap = settings.value(QZSettings::zwiftplay_swap, QZSettings::default_zwiftplay_swap).toBool();
|
||||
QString zwiftPlayLeftName = settings.value(QZSettings::zwift_play_left_name, QZSettings::default_zwift_play_left_name).toString();
|
||||
QString zwiftPlayRightName = settings.value(QZSettings::zwift_play_right_name, QZSettings::default_zwift_play_right_name).toString();
|
||||
|
||||
for (const QBluetoothDeviceInfo &b : qAsConst(devices)) {
|
||||
if ((((b.name().toUpper().startsWith("ZWIFT PLAY"))) || b.name().toUpper().startsWith("ZWIFT RIDE") || b.name().toUpper().startsWith("ZWIFT SF2")) && zwiftPlayDevice.size() < 2 && this->device() &&
|
||||
this->device()->deviceType() == bluetoothdevice::BIKE) {
|
||||
|
||||
// Determine if this is LEFT or RIGHT device
|
||||
AbstractZapDevice::ZWIFT_PLAY_TYPE deviceType = AbstractZapDevice::ZWIFT_PLAY_TYPE::NONE;
|
||||
if(b.manufacturerData(2378).size() > 0) {
|
||||
deviceType = (int(b.manufacturerData(2378).at(0)) == 3 || int(b.manufacturerData(2378).at(0)) == 7) ?
|
||||
AbstractZapDevice::ZWIFT_PLAY_TYPE::LEFT : AbstractZapDevice::ZWIFT_PLAY_TYPE::RIGHT;
|
||||
} else {
|
||||
deviceType = (zwiftPlayDevice.length() == 0) ? AbstractZapDevice::ZWIFT_PLAY_TYPE::LEFT : AbstractZapDevice::ZWIFT_PLAY_TYPE::RIGHT;
|
||||
}
|
||||
|
||||
// Check MAC address filter based on device type
|
||||
bool shouldConnect = true;
|
||||
QString selectedDevice = (deviceType == AbstractZapDevice::ZWIFT_PLAY_TYPE::LEFT) ? zwiftPlayLeftName : zwiftPlayRightName;
|
||||
|
||||
if (selectedDevice != "Auto") {
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_OS_IOS)
|
||||
QString deviceAddress = b.deviceUuid().toString();
|
||||
#else
|
||||
QString deviceAddress = b.address().toString();
|
||||
#endif
|
||||
QString deviceDisplay = b.name() + " (" + deviceAddress + ")";
|
||||
if (deviceDisplay != selectedDevice) {
|
||||
shouldConnect = false; // Skip this device if it doesn't match the selected one
|
||||
}
|
||||
}
|
||||
|
||||
if (!shouldConnect) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(b.manufacturerData(2378).size() > 0) {
|
||||
qDebug() << "this should be 3 or 2. is it? " << int(b.manufacturerData(2378).at(0));
|
||||
zwiftPlayDevice.append(new zwiftclickremote(this->device(),
|
||||
int(b.manufacturerData(2378).at(0)) == 3 || int(b.manufacturerData(2378).at(0)) == 7 ? AbstractZapDevice::ZWIFT_PLAY_TYPE::LEFT : AbstractZapDevice::ZWIFT_PLAY_TYPE::RIGHT));
|
||||
} else {
|
||||
qDebug() << "manufacturer not found for ZWIFT CLICK";
|
||||
zwiftPlayDevice.append(new zwiftclickremote(this->device(),
|
||||
zwiftPlayDevice.length() == 0 ? AbstractZapDevice::ZWIFT_PLAY_TYPE::LEFT : AbstractZapDevice::ZWIFT_PLAY_TYPE::RIGHT));
|
||||
|
||||
}
|
||||
|
||||
zwiftPlayDevice.append(new zwiftclickremote(this->device(), deviceType));
|
||||
// connect(heartRateBelt, SIGNAL(disconnected()), this, SLOT(restart()));
|
||||
|
||||
connect(zwiftPlayDevice.last(), &zwiftclickremote::debug, this, &bluetooth::debug);
|
||||
@@ -4183,3 +4251,11 @@ void bluetooth::deviceUpdated(const QBluetoothDeviceInfo &device, QBluetoothDevi
|
||||
debug("deviceUpdated " + device.name() + " " + updateFields);
|
||||
}
|
||||
#endif
|
||||
|
||||
QStringList bluetooth::getZwiftClickDevices() const {
|
||||
return zwiftClickDevicesList;
|
||||
}
|
||||
|
||||
QStringList bluetooth::getZwiftPlayDevices() const {
|
||||
return zwiftPlayDevicesList;
|
||||
}
|
||||
|
||||
@@ -161,6 +161,8 @@
|
||||
class bluetooth : public QObject, public SignalHandler {
|
||||
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QStringList zwiftClickDevices READ getZwiftClickDevices NOTIFY zwiftClickDevicesChanged)
|
||||
Q_PROPERTY(QStringList zwiftPlayDevices READ getZwiftPlayDevices NOTIFY zwiftPlayDevicesChanged)
|
||||
public:
|
||||
bluetooth(const discoveryoptions &options);
|
||||
explicit bluetooth(bool logs, const QString &deviceName = QLatin1String(""), bool noWriteResistance = false,
|
||||
@@ -175,6 +177,9 @@ class bluetooth : public QObject, public SignalHandler {
|
||||
bool onlyDiscover = false;
|
||||
volatile bool homeformLoaded = false;
|
||||
|
||||
QStringList getZwiftClickDevices() const;
|
||||
QStringList getZwiftPlayDevices() const;
|
||||
|
||||
private:
|
||||
bool useDiscovery = false;
|
||||
QFile *debugCommsLog = nullptr;
|
||||
@@ -308,6 +313,10 @@ class bluetooth : public QObject, public SignalHandler {
|
||||
elitesquarecontroller* eliteSquareController = nullptr;
|
||||
QString filterDevice = QLatin1String("");
|
||||
|
||||
// Device discovery lists for Zwift devices
|
||||
QStringList zwiftClickDevicesList;
|
||||
QStringList zwiftPlayDevicesList;
|
||||
|
||||
bool testResistance = false;
|
||||
bool noWriteResistance = false;
|
||||
bool noHeartService = false;
|
||||
@@ -365,6 +374,8 @@ class bluetooth : public QObject, public SignalHandler {
|
||||
|
||||
void bluetoothDeviceConnected(bluetoothdevice *b);
|
||||
void bluetoothDeviceDisconnected();
|
||||
void zwiftClickDevicesChanged();
|
||||
void zwiftPlayDevicesChanged();
|
||||
public slots:
|
||||
void restart();
|
||||
void debug(const QString &string);
|
||||
|
||||
183
src/qdomyos-zwift.pro.user.568050d
Normal file
183
src/qdomyos-zwift.pro.user.568050d
Normal file
@@ -0,0 +1,183 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 6.0.2, 2025-08-20T15:38:07. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{568050d7-c503-4fc0-9ae4-06a869edadb0}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
|
||||
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
|
||||
<value type="QString" key="ClangCodeModel.WarningConfigId">Builtin.BuildSystem</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">4</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{2eb206bb-7c50-4d71-9631-4ca0a2afd6d4}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/cagnulein/qdomyos-zwift/build-qdomyos-zwift-Desktop-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/cagnulein/qdomyos-zwift/build-qdomyos-zwift-Desktop-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">1</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/cagnulein/qdomyos-zwift/src/qdomyos-zwift.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/cagnulein/qdomyos-zwift/src/qdomyos-zwift.pro</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/cagnulein/qdomyos-zwift/build-qdomyos-zwift-Desktop-Release</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
@@ -983,9 +983,15 @@ const QString QZSettings::calories_from_hr = QStringLiteral("calories_from_hr");
|
||||
const QString QZSettings::height = QStringLiteral("height");
|
||||
const QString QZSettings::taurua_ic90 = QStringLiteral("taurua_ic90");
|
||||
const QString QZSettings::proform_csx210 = QStringLiteral("proform_csx210");
|
||||
const QString QZSettings::zwift_click_name = QStringLiteral("zwift_click_name");
|
||||
const QString QZSettings::default_zwift_click_name = QStringLiteral("Auto");
|
||||
const QString QZSettings::zwift_play_left_name = QStringLiteral("zwift_play_left_name");
|
||||
const QString QZSettings::default_zwift_play_left_name = QStringLiteral("Auto");
|
||||
const QString QZSettings::zwift_play_right_name = QStringLiteral("zwift_play_right_name");
|
||||
const QString QZSettings::default_zwift_play_right_name = QStringLiteral("Auto");
|
||||
|
||||
|
||||
const uint32_t allSettingsCount = 807;
|
||||
const uint32_t allSettingsCount = 810;
|
||||
|
||||
QVariant allSettings[allSettingsCount][2] = {
|
||||
{QZSettings::cryptoKeySettingsProfiles, QZSettings::default_cryptoKeySettingsProfiles},
|
||||
@@ -1813,6 +1819,9 @@ QVariant allSettings[allSettingsCount][2] = {
|
||||
{QZSettings::height, QZSettings::default_height},
|
||||
{QZSettings::taurua_ic90, QZSettings::default_taurua_ic90},
|
||||
{QZSettings::proform_csx210, QZSettings::default_proform_csx210},
|
||||
{QZSettings::zwift_click_name, QZSettings::default_zwift_click_name},
|
||||
{QZSettings::zwift_play_left_name, QZSettings::default_zwift_play_left_name},
|
||||
{QZSettings::zwift_play_right_name, QZSettings::default_zwift_play_right_name},
|
||||
{QZSettings::toorxtreadmill_discovery_completed, QZSettings::default_toorxtreadmill_discovery_completed},
|
||||
};
|
||||
|
||||
|
||||
@@ -2699,6 +2699,24 @@ class QZSettings {
|
||||
static const QString proform_csx210;
|
||||
static constexpr bool default_proform_csx210 = false;
|
||||
|
||||
/**
|
||||
* @brief Zwift Click device MAC address selection
|
||||
*/
|
||||
static const QString zwift_click_name;
|
||||
static const QString default_zwift_click_name;
|
||||
|
||||
/**
|
||||
* @brief Zwift Play left device MAC address selection
|
||||
*/
|
||||
static const QString zwift_play_left_name;
|
||||
static const QString default_zwift_play_left_name;
|
||||
|
||||
/**
|
||||
* @brief Zwift Play right device MAC address selection
|
||||
*/
|
||||
static const QString zwift_play_right_name;
|
||||
static const QString default_zwift_play_right_name;
|
||||
|
||||
/**
|
||||
* @brief Write the QSettings values using the constants from this namespace.
|
||||
* @param showDefaults Optionally indicates if the default should be shown with the key.
|
||||
|
||||
@@ -1207,6 +1207,9 @@ import Qt.labs.platform 1.1
|
||||
property bool toorxtreadmill_discovery_completed: false
|
||||
property bool taurua_ic90: false
|
||||
property bool proform_csx210: false
|
||||
property string zwift_click_name: "Auto"
|
||||
property string zwift_play_left_name: "Auto"
|
||||
property string zwift_play_right_name: "Auto"
|
||||
}
|
||||
|
||||
|
||||
@@ -11662,7 +11665,85 @@ import Qt.labs.platform 1.1
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
color: Material.color(Material.Lime)
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr("Zwift Click Device")
|
||||
visible: settings.zwift_click
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
id: zwiftClickDeviceCombo
|
||||
visible: settings.zwift_click
|
||||
Layout.fillWidth: true
|
||||
model: rootItem.bluetooth ? rootItem.bluetooth.zwiftClickDevices : ["Auto"]
|
||||
currentIndex: {
|
||||
if (rootItem.bluetooth && rootItem.bluetooth.zwiftClickDevices) {
|
||||
return Math.max(0, rootItem.bluetooth.zwiftClickDevices.indexOf(settings.zwift_click_name))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
onCurrentTextChanged: {
|
||||
if (currentText && currentText !== settings.zwift_click_name) {
|
||||
settings.zwift_click_name = currentText
|
||||
window.settings_restart_to_apply = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr("Zwift Play Left Device")
|
||||
visible: settings.zwift_play
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
id: zwiftPlayLeftDeviceCombo
|
||||
visible: settings.zwift_play
|
||||
Layout.fillWidth: true
|
||||
model: rootItem.bluetooth ? rootItem.bluetooth.zwiftPlayDevices : ["Auto"]
|
||||
currentIndex: {
|
||||
if (rootItem.bluetooth && rootItem.bluetooth.zwiftPlayDevices) {
|
||||
return Math.max(0, rootItem.bluetooth.zwiftPlayDevices.indexOf(settings.zwift_play_left_name))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
onCurrentTextChanged: {
|
||||
if (currentText && currentText !== settings.zwift_play_left_name) {
|
||||
settings.zwift_play_left_name = currentText
|
||||
window.settings_restart_to_apply = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr("Zwift Play Right Device")
|
||||
visible: settings.zwift_play
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
id: zwiftPlayRightDeviceCombo
|
||||
visible: settings.zwift_play
|
||||
Layout.fillWidth: true
|
||||
model: rootItem.bluetooth ? rootItem.bluetooth.zwiftPlayDevices : ["Auto"]
|
||||
currentIndex: {
|
||||
if (rootItem.bluetooth && rootItem.bluetooth.zwiftPlayDevices) {
|
||||
return Math.max(0, rootItem.bluetooth.zwiftPlayDevices.indexOf(settings.zwift_play_right_name))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
onCurrentTextChanged: {
|
||||
if (currentText && currentText !== settings.zwift_play_right_name) {
|
||||
settings.zwift_play_right_name = currentText
|
||||
window.settings_restart_to_apply = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IndicatorOnlySwitch {
|
||||
text: qsTr("Buttons debouncing")
|
||||
|
||||
Reference in New Issue
Block a user