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

#855 Support for the Trixter X-Dream V1 bike #899

Open
wants to merge 331 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
331 commits
Select commit Hold shift + click to select a range
ce2c86b
#855 try a 4kb read buffer on the serial port.
drmason789 Aug 28, 2022
ad6ceba
#855 rework setting of resistance so that UI goes through the slot an…
drmason789 Aug 28, 2022
69ccfdf
#855 move set_resistance out of the slots section
drmason789 Sep 3, 2022
e7b53b6
#855 emit resistanceRead
drmason789 Sep 6, 2022
c2efdca
#855 moved some functionality to cpp file
drmason789 Sep 6, 2022
4684a98
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Sep 6, 2022
68d250e
Create QSerialPort in run method of parent. Seems more reliable.
drmason789 Sep 6, 2022
3eafd14
Doubled power boost from brake levers
drmason789 Sep 7, 2022
aee85c6
#855 rework trixterxdreamv1serial so that reads and writes are done o…
drmason789 Sep 8, 2022
49cd003
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Sep 13, 2022
37899a2
#855 fixed merge conflict
drmason789 Sep 13, 2022
ccc9739
#855 attempt to spend less of the serial port thread's time updating …
drmason789 Sep 13, 2022
12e7ec3
#855 send resistance gain to virtual device constructor. Hook and pro…
drmason789 Sep 13, 2022
6ec98cd
#855 adjust "is connected" logic
drmason789 Sep 13, 2022
20ea60d
#855 put client on actual time so that the state timestamps mean some…
drmason789 Sep 14, 2022
d435faf
#855 working much better now, but only using resistance calculated fr…
drmason789 Sep 17, 2022
e887025
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Sep 17, 2022
e275ba7
Disabled power boost feature
drmason789 Sep 17, 2022
496115c
Merge branch 'trixter-xdream-v1-bike' of https://github.com/drmason78…
drmason789 Sep 17, 2022
bd1eb2e
#855 removed 0.100 resistance option. Use inclination for power/resis…
drmason789 Sep 24, 2022
5fa2457
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Sep 24, 2022
150a61c
#855 tweaked power calculation
drmason789 Sep 24, 2022
cdac305
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Oct 3, 2022
b63bb0d
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Oct 5, 2022
90c444c
Merge branch 'cagnulein:master' into trixter-xdream-v1-bike
drmason789 Oct 6, 2022
f6efe1e
Merge branch 'cagnulein:master' into trixter-xdream-v1-bike
drmason789 Oct 6, 2022
bfd677f
adding acceleration in the calculation of the speed based on wattage
cagnulein Sep 24, 2022
db252c3
fixing negative speed values
cagnulein Sep 25, 2022
0472666
rolling resistance setting added
cagnulein Sep 26, 2022
297497f
updating ios project
cagnulein Oct 6, 2022
8f972f3
fixing another merge issue
cagnulein Oct 6, 2022
66717a8
GPX Issues on Treadmill #973
cagnulein Oct 7, 2022
8f7d8d1
fixed qzsettings usage
cagnulein Oct 8, 2022
c8ec85e
GPX Issues on Treadmill #973
cagnulein Oct 8, 2022
6b5234e
fixed crash for nautilus treadmill
cagnulein Oct 8, 2022
56f0f3b
GPX Issues on Treadmill #973
cagnulein Oct 9, 2022
bb91498
Adding ESLinker YPOO Mini Change treadmill
nzbrian Oct 10, 2022
0d7a54c
GPX Issues on Treadmill #973
cagnulein Oct 10, 2022
9a64874
fixing build error on iOS
cagnulein Oct 10, 2022
8fc945f
fixin avg inclination for treadmill
cagnulein Oct 10, 2022
64466da
fix typo
cagnulein Oct 10, 2022
722447a
GPX Issues on Treadmill #973
cagnulein Oct 11, 2022
fd96a33
fixed typo
cagnulein Oct 11, 2022
8dc28af
license request every 30s
cagnulein Oct 11, 2022
f93d54e
Pro FlexCycle #979
cagnulein Oct 12, 2022
6158bc0
Bike Support Merach MRK-S02-0B8D #978
cagnulein Oct 12, 2022
024f14e
Average Speed in the Email doesn't match #977
cagnulein Oct 12, 2022
3fd5575
Update settings.qml
cagnulein Oct 12, 2022
b60f1fd
Zwift Workouts Over Cadence #980
cagnulein Oct 13, 2022
1f75467
Keep Video and Gpx Position synchronized (Addition to #838) (#945)
Bepo7012 Oct 13, 2022
f546782
Wahoo Direct Connect #476 RGT compatibility fixed
cagnulein Oct 13, 2022
ea04794
adding a setting for zwift compatibility #476
cagnulein Oct 13, 2022
d567c9c
adding debug on ftmsbike
cagnulein Oct 13, 2022
16e1d53
Pro FlexCycle #979
cagnulein Oct 13, 2022
d225d7b
GPX Issues on Treadmill (Issue #973
cagnulein Oct 16, 2022
7ee7eae
calling watts() instead of m_watt on speed based on power formula
cagnulein Oct 14, 2022
c403f4d
android version 2.11.70
cagnulein Oct 14, 2022
d47a88f
Merach MRK-S02-0B8D Resistance Change #984
cagnulein Oct 16, 2022
c553052
Update 30_usage.md (#985)
bstoney Oct 16, 2022
1fabd60
GPX Issues on Treadmill #973
cagnulein Oct 16, 2022
0deb600
adding wifi permissions on android in order to collect the ip address…
cagnulein Oct 16, 2022
6f0f22c
Android 2 Android Wahoo Kickr direct no data #983
cagnulein Oct 17, 2022
8bab3ee
Android 2 Android Wahoo Kickr direct no data #983
cagnulein Oct 17, 2022
ff8f4fb
Disable TTS prefixes for frequent repetitions #986
cagnulein Oct 17, 2022
b51b44b
version 2.11.74 for android
cagnulein Oct 17, 2022
a87062e
gpx without timestamp fixed
cagnulein Oct 17, 2022
4db86b7
version 2.11.75
cagnulein Oct 18, 2022
fa87073
Differences in the GPX starting point #988
cagnulein Oct 18, 2022
da8e8a0
Revert "Differences in the GPX starting point #988"
cagnulein Oct 18, 2022
21fadc3
keeping useful modification
cagnulein Oct 18, 2022
487eda2
Differences in the GPX starting point #988
cagnulein Oct 19, 2022
b534fdd
fixed speed value conversion in SpeedChannelController
jwatral Oct 19, 2022
7fde807
removed cadence reference usage in ChannelService
jwatral Oct 19, 2022
e5ee463
helper label added
cagnulein Oct 20, 2022
c4f10b1
Spirit XT385 not able to get working, Gets discovered but can't see Q…
cagnulein Oct 22, 2022
b26955c
Spirit XT385 not able to get working, Gets discovered but can't see Q…
cagnulein Oct 24, 2022
a416ea7
Preset resistance tiles (#493)
cagnulein Oct 24, 2022
caf433e
fixing typo
cagnulein Oct 24, 2022
7797ca7
Differences in the GPX starting point #988
cagnulein Oct 25, 2022
751084d
yesoul target resistance fixed on zwift
cagnulein Oct 24, 2022
1e3e3c6
#1000 removed searchStopped check from virtual device setup
drmason789 Oct 24, 2022
1f85046
#998 only attempt to set up virtual device on first update
drmason789 Oct 24, 2022
5d5dcf6
Spirit XT385 not able to get working, Gets discovered but can't see Q…
cagnulein Oct 25, 2022
c8f719d
android version 2.11.82
cagnulein Oct 25, 2022
75d70b8
Update trainprogram.cpp
Bepo7012 Oct 25, 2022
11171e8
Differences in the GPX starting point #988
cagnulein Oct 26, 2022
0b6dacc
version 2.11.83
cagnulein Oct 26, 2022
0c45f73
inCondi ET660i support #1007
cagnulein Oct 26, 2022
3f40f34
build issues
cagnulein Oct 26, 2022
25dc0ef
Apple Watch Miles and Km conversion #1006
cagnulein Oct 26, 2022
922a2c3
Added Debug for Video Jump Issues
Bepo7012 Oct 26, 2022
c4b1d4c
fixing speed gain and offset to the calculateSpeedFromPower function
cagnulein Oct 26, 2022
b80aac7
adding ECH-UK as another name of echelon stride
cagnulein Oct 26, 2022
169753a
iOS version 2.11.83
cagnulein Oct 26, 2022
dacd662
Differences in the GPX starting point #988
cagnulein Oct 28, 2022
8beb57a
preparing version 2.11.84
cagnulein Oct 28, 2022
3b855e6
Differences in the GPX starting point (Issue #988)
cagnulein Oct 28, 2022
059a38e
fixing a problem with the speed based on power setting enabled
cagnulein Oct 28, 2022
9ee8dc4
erg mode added to proformwifiibike
cagnulein Oct 28, 2022
daeaa90
optimizing bluetooth traffic over fitmetria
cagnulein Oct 28, 2022
ba8edde
proformwifibike: send only 0.5 inclination
cagnulein Oct 28, 2022
085377e
ios dircon permission fixed #1011
cagnulein Oct 28, 2022
2f7d5c7
new raspberry install #1014
cagnulein Oct 31, 2022
6e2747e
inCondi ET660i support #1007
cagnulein Nov 2, 2022
d044800
Preset resistance tiles #493
cagnulein Nov 2, 2022
be037d8
AVG Watts per Lap #1009
cagnulein Nov 2, 2022
818712f
bluetooth discovery fitfan improvement
cagnulein Nov 2, 2022
2592036
iOS project updated
cagnulein Nov 6, 2022
d8e708c
Life Fitness Treadmill FTMS #1018
cagnulein Nov 3, 2022
2ccc6dd
Fitshow FTMS bike doesn't send metrics #1019
cagnulein Nov 3, 2022
820831e
Differences in the GPX starting point #988
cagnulein Nov 3, 2022
356b289
using watt gain and watt offset even for target_watt for proform bikes
cagnulein Nov 3, 2022
3b4b401
GPX Issues on Treadmill #973
cagnulein Nov 3, 2022
7efa02f
GPX Issues on Treadmill #973
cagnulein Nov 3, 2022
a3dd3bd
QZ / ZWIFT / Treadmill / Smartwatch: Different distance value #1022
cagnulein Nov 4, 2022
558c2e2
Octane Fitness Q37xi Support #1023
cagnulein Nov 4, 2022
660d074
#962 Bluetooth details to settings for all devices (#963)
drmason789 Nov 4, 2022
4ce107d
Fix typos (#1025)
Gelma Nov 5, 2022
2e817a5
Disable TTS prefixes for frequent repetitions #986
cagnulein Nov 7, 2022
f2a4fe1
fixing integer cast for inclination for the proform wifi bike
cagnulein Nov 7, 2022
273f71f
Life Fitness Treadmill FTMS #1018
cagnulein Nov 8, 2022
ab8789a
NordiTrack T 7.0 treadmill #1030
cagnulein Nov 8, 2022
af89b53
JK fitness 577 bike #1032
cagnulein Nov 8, 2022
5586017
Test Videos with higher fps Rates (#1024)
Bepo7012 Nov 8, 2022
55e3a20
qmdnsengine doesn't work anymore with iOS 16 or Ventura #1011
cagnulein Nov 8, 2022
670dc1c
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Dec 1, 2022
c4ce1ff
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Jan 2, 2023
b017962
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Jan 13, 2023
88ab645
#855 tests for Trixter X-Dream V1 Bike. Since detection currently req…
drmason789 Jan 13, 2023
7dd4f14
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Jan 28, 2023
8602c1e
Merge branch 'cagnulein:master' into trixter-xdream-v1-bike
drmason789 Jan 30, 2023
a9ae837
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 13, 2023
a234166
#855 capitalization for Linux
drmason789 Feb 20, 2023
4776da6
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 21, 2023
f067d91
Merge branch 'cagnulein:master' into trixter-xdream-v1-bike
drmason789 Feb 21, 2023
a7c5b9f
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 21, 2023
e5fb8a8
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Mar 13, 2023
4acd8f0
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Mar 16, 2023
25ff171
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Apr 2, 2023
7b6fa73
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Apr 29, 2023
dd1363d
#855 fix merge problem
drmason789 Apr 29, 2023
f64b2da
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 May 16, 2023
ca4ea11
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 May 22, 2023
4f7c06f
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Aug 11, 2023
862272f
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Dec 18, 2023
4f248e5
#855 use of QZSettings, and added basic test for power/resistance cal…
drmason789 Dec 26, 2023
9c72a1d
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Dec 26, 2023
6fb3401
#855 do non-bluetooth device discovery even when there are no bluetoo…
drmason789 Dec 28, 2023
1076221
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Jan 1, 2024
dcca91e
#855 use of QZSettings
drmason789 Jan 1, 2024
e637805
#855 include serialport in IOS builds
drmason789 Jan 1, 2024
4f06201
#855 Attempt to install serial port module for Qt in IOS
drmason789 Jan 2, 2024
fbb7559
#855 try to install QT serial port library for IOS
drmason789 Jan 2, 2024
a301720
#855 try the non-dev version
drmason789 Jan 2, 2024
7e91adc
#855 add command to list available modules for IOS QT installation
drmason789 Jan 2, 2024
6f0f30e
#855 towards disabling support for the Trixter X-Dream bike in iOS (w…
drmason789 Jan 3, 2024
f329bcc
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Jan 3, 2024
f95f9db
#855 avoid serial port code for iOS builds
drmason789 Jan 3, 2024
90ada8b
#855
drmason789 Jan 3, 2024
a0689cb
#855 fix linux build
drmason789 Jan 3, 2024
a400c43
#855 more sensible behaviour in Zwift now, but still a strange target…
drmason789 Jan 4, 2024
d9dfff9
#855 updated with bilinearly interpolated power table, and unit test …
drmason789 Jan 8, 2024
90e4962
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Jan 8, 2024
b4d1b53
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Jan 16, 2024
3f76917
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Jan 16, 2024
f67fef4
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Jan 23, 2024
c56ad68
#855 emulate ERG hardwware with no up-down filters
drmason789 Jan 27, 2024
a5d45b1
#855 fixed typo and added a blank line
drmason789 Jan 27, 2024
2e0be29
#855 further edits to bike::changePower
drmason789 Jan 27, 2024
5a46802
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Jan 27, 2024
7e17845
Merge branch 'trixter-xdream-v1-bike' of https://github.com/drmason78…
drmason789 Jan 30, 2024
3c90a7c
#855 auto switch betweenERG and IBSP mode
drmason789 Feb 3, 2024
2a2e2c6
Merge branch 'trixter-xdream-v1-bike' of https://github.com/drmason78…
drmason789 Feb 3, 2024
cbb1453
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 3, 2024
87f75f6
#855 enable C++17 in the test project to allow std::optional
drmason789 Feb 3, 2024
aa62f97
#855 attempt to make std::optional compile
drmason789 Feb 3, 2024
22cbff7
#855 disabled in Android builds and removed QSerialPort references
drmason789 Feb 4, 2024
fb638e8
#855 fixed #if(n)defs
drmason789 Feb 4, 2024
f06e27f
#855 fix return values in iOS and Android builds
drmason789 Feb 4, 2024
687b974
#855 simplify #ifs
drmason789 Feb 4, 2024
73ffe01
#855 update label in settings to indicate it's Windows/Linux only. At…
drmason789 Feb 4, 2024
658db46
#855 attempt to avoid using serialport config in IOS builds
drmason789 Feb 4, 2024
44d2cde
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 4, 2024
bab860c
#855 remove unintended change
drmason789 Feb 4, 2024
bba3425
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 5, 2024
c75219f
#855 align main.yaml with master
drmason789 Feb 5, 2024
dfacc78
#855 revert characteristicwriteprocessor.cpp
drmason789 Feb 5, 2024
1065d7b
#855 revert settings.qml
drmason789 Feb 5, 2024
4cbc2a6
#855 revert horizontreadmill.h
drmason789 Feb 5, 2024
2100f50
#855
drmason789 Feb 5, 2024
cebd52b
#855 smooth readings over 500ms
drmason789 Feb 5, 2024
4ca5534
Merge branch 'trixter-xdream-v1-bike' of https://github.com/drmason78…
drmason789 Feb 5, 2024
ec24b4b
#855 revert main.yaml
drmason789 Feb 5, 2024
8a7deb8
#855 revert main.yaml
drmason789 Feb 5, 2024
d6836a4
#855 dependency injection of serial data source for ultimate use in u…
drmason789 Feb 6, 2024
e9208a0
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 6, 2024
c53cf3f
#855 current state of work using test stub for serial data
drmason789 Feb 7, 2024
0f323dc
Merge branch 'trixter-xdream-v1-bike' of https://github.com/drmason78…
drmason789 Feb 7, 2024
146e925
#855 detection test for Trixter X-Dream V1 Bike now working using a stub
drmason789 Feb 8, 2024
7539b9f
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 8, 2024
31fbc7a
#855 updated #include
drmason789 Feb 8, 2024
a8e6a07
#855 fix Linux build error
drmason789 Feb 8, 2024
5bc6e7a
#855 added web link
drmason789 Feb 8, 2024
a43ce26
#855 fixed Linux build error
drmason789 Feb 8, 2024
28883ca
#855 fix for IOS and Android builds
drmason789 Feb 8, 2024
ba8f0ba
#855 refactoring
drmason789 Feb 9, 2024
0c6462b
Merge branch 'cagnulein:master' into trixter-xdream-v1-bike
drmason789 Feb 9, 2024
c63b78f
#855 removed debug wait time to detect Trixter X-Dream Bike
drmason789 Feb 10, 2024
3f9bc9b
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 11, 2024
f4b62e4
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 11, 2024
5e1b2c4
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 17, 2024
d71208b
#855 restored Trixter X-Dream bike settings to setting.qml and rearra…
drmason789 Feb 17, 2024
894e208
Merge branch 'cagnulein:master' into trixter-xdream-v1-bike
drmason789 Feb 17, 2024
56c6ff5
#855 alterations to send resistance packet at consistent time interva…
drmason789 Feb 18, 2024
512d0a7
#855 added serialdatasource::flush()
drmason789 Feb 18, 2024
430eab0
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 20, 2024
8e1a64d
#855 lock outgoing resistance information separately from main update
drmason789 Feb 25, 2024
0fd9f36
Merge branch 'trixter-xdream-v1-bike' of https://github.com/drmason78…
drmason789 Feb 25, 2024
c9cba88
#855
drmason789 Feb 25, 2024
5fc44a8
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Feb 27, 2024
6f0c603
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Mar 7, 2024
8f74a32
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Mar 19, 2024
b8bfdef
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Apr 28, 2024
a9546e1
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Jul 27, 2024
a816364
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Oct 7, 2024
734fc16
#855 restored setting after merge
drmason789 Oct 8, 2024
36a8420
Merge branch 'master' into trixter-xdream-v1-bike
drmason789 Oct 9, 2024
9dc3b00
Kingsmith K12 #2642
cagnulein Oct 10, 2024
9293aab
Xiaomi treadmill x21 new type #2649
cagnulein Oct 11, 2024
b05c9be
Xiaomi treadmill x21 new type #2649
cagnulein Oct 11, 2024
8a28b92
Initial implement start/stop control of KingSmith R2 when press start…
d3m3vilurr Oct 12, 2024
b1b1390
Tacx Neo 2 freewheel keeps spinning #2650
cagnulein Oct 14, 2024
56959e6
Use Volume buttons for manually changing speed (Issue #2657)
cagnulein Oct 14, 2024
9c0465c
Use Volume buttons for manually changing speed #2657
cagnulein Oct 14, 2024
92eaf18
Proform 575i (Issue #2652)
cagnulein Oct 14, 2024
ed60df1
Update project.pbxproj
cagnulein Oct 14, 2024
5564c45
2.18.0 android
cagnulein Oct 14, 2024
48ad26b
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Oct 16, 2024
5138669
Merge branch 'cagnulein:master' into trixter-xdream-v1-bike
drmason789 Oct 16, 2024
1a6b358
#855 added device initialization to test data
drmason789 Oct 16, 2024
b00d369
#855 TXDB settings to QZSettings
drmason789 Oct 18, 2024
045557d
Adjustments to get TXDB test to work
drmason789 Oct 18, 2024
781237e
Adjustments to get TXDB test to work #855
drmason789 Oct 18, 2024
2933d82
Merge remote-tracking branch 'remotes/origin/master' into trixter-xdr…
drmason789 Oct 19, 2024
0b24dba
Merge remote-tracking branch 'origin/trixter-xdream-v1-bike' into tri…
drmason789 Oct 19, 2024
30d1f87
#855 restored Tacx Neo tests
drmason789 Oct 19, 2024
4c47c1e
#855 added some logging to try to see where the github build crashes
drmason789 Oct 21, 2024
6e7dfeb
#855 fix case in settings.qml
drmason789 Oct 21, 2024
d3c6151
#855 settings adjustments
drmason789 Oct 22, 2024
b814899
#855 restored QZSettings setup array
drmason789 Oct 22, 2024
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
4 changes: 2 additions & 2 deletions docs/10_Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Once you've installed QDomyos-Zwift, you can access the [operation guide](30_usa

```buildoutcfg
$ sudo apt update && sudo apt upgrade # this is very important on raspberry pi: you need the bluetooth firmware updated!
$ sudo apt install git qtquickcontrols2-5-dev libqt5bluetooth5 libqt5widgets5 libqt5positioning5 libqt5xml5 qtconnectivity5-dev qtpositioning5-dev libqt5charts5-dev libqt5charts5 qt5-assistant libqt5networkauth5-dev libqt5websockets5-dev qml-module* libqt5texttospeech5-dev libqt5texttospeech5 libqt5location5-plugins qtlocation5-dev qtmultimedia5-dev libqt5multimediawidgets5 libqt5multimedia5-plugins libqt5multimedia5
$ sudo apt install git qtquickcontrols2-5-dev libqt5serialport5-dev libqt5bluetooth5 libqt5widgets5 libqt5positioning5 libqt5xml5 qtconnectivity5-dev qtpositioning5-dev libqt5charts5-dev libqt5charts5 qt5-assistant libqt5networkauth5-dev libqt5websockets5-dev qml-module* libqt5texttospeech5-dev libqt5texttospeech5 libqt5location5-plugins qtlocation5-dev qtmultimedia5-dev libqt5multimediawidgets5 libqt5multimedia5-plugins libqt5multimedia5
$ git clone https://github.com/cagnulein/qdomyos-zwift.git
$ cd qdomyos-zwift
$ git submodule update --init src/smtpclient/
Expand Down Expand Up @@ -102,7 +102,7 @@ This operation takes a moment to complete.

#### Install qdomyos-zwift from sources

`sudo apt install git libqt5bluetooth5 libqt5widgets5 libqt5positioning5 libqt5xml5 qtconnectivity5-dev qtpositioning5-dev libqt5charts5-dev libqt5charts5 qt5-assistant libqt5networkauth5-dev libqt5websockets5-dev qtmultimedia5-dev libqt5multimediawidgets5 libqt5multimedia5-plugins libqt5multimedia5 qtlocation5-dev qtquickcontrols2-5-dev libqt5texttospeech5-dev libqt5texttospeech5`
`$ sudo apt install git qtquickcontrols2-5-dev libqt5serialport5-dev libqt5bluetooth5 libqt5widgets5 libqt5positioning5 libqt5xml5 qtconnectivity5-dev qtpositioning5-dev libqt5charts5-dev libqt5charts5 qt5-assistant libqt5networkauth5-dev libqt5websockets5-dev qml-module* libqt5texttospeech5-dev libqt5texttospeech5 libqt5location5-plugins qtlocation5-dev qtmultimedia5-dev libqt5multimediawidgets5 libqt5multimedia5-plugins libqt5multimedia5`

`git clone https://github.com/cagnulein/qdomyos-zwift.git`
`cd qdomyos-zwift`
Expand Down
126 changes: 96 additions & 30 deletions src/bluetooth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ bluetooth::bluetooth(bool logs, const QString &deviceName, bool noWriteResistanc
uint32_t pollDeviceTime, bool noConsole, bool testResistance, uint8_t bikeResistanceOffset,
double bikeResistanceGain) {
QSettings settings;
bool trx_route_key = settings.value(QStringLiteral("trx_route_key"), false).toBool();
bool bh_spada_2 = settings.value(QStringLiteral("bh_spada_2"), false).toBool();
bool technogym_myrun_treadmill_experimental =
settings.value(QStringLiteral("technogym_myrun_treadmill_experimental"), false).toBool();

QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true"));
filterDevice = deviceName;
Expand Down Expand Up @@ -48,6 +44,7 @@ bluetooth::bluetooth(bool logs, const QString &deviceName, bool noWriteResistanc
connectedAndDiscovered();
return;
#endif

#if !defined(WIN32) && !defined(Q_OS_IOS)
if (QBluetoothLocalDevice::allDevices().isEmpty()) {
debug(QStringLiteral("no bluetooth dongle found!"));
Expand Down Expand Up @@ -104,18 +101,48 @@ bluetooth::bluetooth(bool logs, const QString &deviceName, bool noWriteResistanc
}
#endif

#ifndef Q_OS_IOS
if (!trx_route_key && !bh_spada_2 && !technogym_myrun_treadmill_experimental)
#endif
discoveryAgent->start(QBluetoothDeviceDiscoveryAgent::LowEnergyMethod);
#ifndef Q_OS_IOS
else
discoveryAgent->start(QBluetoothDeviceDiscoveryAgent::ClassicMethod |
QBluetoothDeviceDiscoveryAgent::LowEnergyMethod);
#endif
this->startDiscovery();
}
}

void bluetooth::nonBluetoothDeviceDiscovery() {
bluetoothdevice * nonBluetoothDevice = this->discoverNonBluetoothDevices();

if(nonBluetoothDevice) {
if(this->discoveryAgent) discoveryAgent->stop();
this->userTemplateManager->start(nonBluetoothDevice);
this->innerTemplateManager->start(nonBluetoothDevice);
emit this->deviceConnected(nonBluetoothDevice->bluetoothDevice);
connect(nonBluetoothDevice, &bluetoothdevice::connectedAndDiscovered, this, &bluetooth::connectedAndDiscovered);
this->connectedAndDiscovered();
}
}

bluetoothdevice * bluetooth::discoverNonBluetoothDevices() {
QSettings settings;

/*
Calling code expects the returned bluetoothdevice subclass object to have set fake bluetooth device info.

Do this in the class constructor as follows:
1. Go to a website and generate a Bluetooth UUID.
2. Set bluetoothdevice::bluetoothDevice as follows, using the UUID you have obtained, and a user-friendly name.

this->bluetoothDevice =
QBluetoothDeviceInfo(QBluetoothUuid {QStringLiteral("775f25bd-6636-4cdc-9398-839ae026be1d")}, "Device Name", 0);
*/

// Try to connect to a Trixter X-Dream V1 bike if the setting is enabled.
this->trixterXDreamV1Bike = this->findTrixterXDreamV1Bike(settings);
if(this->trixterXDreamV1Bike)
return this->trixterXDreamV1Bike;

// Test for other devices

// nothing found
return nullptr;
}

bluetooth::~bluetooth() {

/*if(device())
Expand Down Expand Up @@ -153,12 +180,11 @@ void bluetooth::finished() {
powerSensorName.startsWith(QStringLiteral("Disabled")) && !power_as_bike && !power_as_treadmill;
bool eliteRizerFound = eliteRizerName.startsWith(QStringLiteral("Disabled"));
bool eliteSterzoSmartFound = eliteSterzoSmartName.startsWith(QStringLiteral("Disabled"));
bool trx_route_key = settings.value(QStringLiteral("trx_route_key"), false).toBool();
bool bh_spada_2 = settings.value(QStringLiteral("bh_spada_2"), false).toBool();


bool heartRateBeltFound = heartRateBeltName.startsWith(QStringLiteral("Disabled"));
bool ftmsAccessoryFound = ftmsAccessoryName.startsWith(QStringLiteral("Disabled"));
bool technogym_myrun_treadmill_experimental =
settings.value(QStringLiteral("technogym_myrun_treadmill_experimental"), false).toBool();


// since i can have multiple fanfit i can't wait more because i don't have the full list of the fanfit
// devices connected to QZ
Expand All @@ -172,18 +198,33 @@ void bluetooth::finished() {
forceHeartBeltOffForTimeout = true;
}

#ifndef Q_OS_IOS
if (!trx_route_key && !bh_spada_2 && !technogym_myrun_treadmill_experimental) {
#endif
discoveryAgent->start(QBluetoothDeviceDiscoveryAgent::LowEnergyMethod);
#ifndef Q_OS_IOS
} else {
discoveryAgent->start(QBluetoothDeviceDiscoveryAgent::ClassicMethod |
QBluetoothDeviceDiscoveryAgent::LowEnergyMethod);
}
#endif
this->startDiscovery();
}

void bluetooth::startDiscovery() {

#ifndef Q_OS_IOS
QSettings settings;
bool technogym_myrun_treadmill_experimental =
settings.value(QStringLiteral("technogym_myrun_treadmill_experimental"), false).toBool();
bool trx_route_key = settings.value(QStringLiteral("trx_route_key"), false).toBool();
bool bh_spada_2 = settings.value(QStringLiteral("bh_spada_2"), false).toBool();

if (!trx_route_key && !bh_spada_2 && !technogym_myrun_treadmill_experimental) {
#endif
discoveryAgent->start(QBluetoothDeviceDiscoveryAgent::LowEnergyMethod);
#ifndef Q_OS_IOS
} else {
discoveryAgent->start(QBluetoothDeviceDiscoveryAgent::ClassicMethod |
QBluetoothDeviceDiscoveryAgent::LowEnergyMethod);
}
#endif


QTimer::singleShot(1, this, &bluetooth::nonBluetoothDeviceDiscovery);
}


void bluetooth::canceled() {
debug(QStringLiteral("BTLE scanning stops"));

Expand All @@ -197,6 +238,23 @@ void bluetooth::debug(const QString &text) {
}
}


trixterxdreamv1bike * bluetooth::findTrixterXDreamV1Bike(const QSettings& settings)
{
bool trixterxdreamv1bikeEnabled = settings.value(trixterxdreamv1settings::keys::Enabled, false).toBool();
trixterxdreamv1bike * result = nullptr;
if(trixterxdreamv1bikeEnabled) {
debug("Looking for Trixter X-Dream V1 Bike");
result = trixterxdreamv1bike::tryCreate(this->noWriteResistance, this->noHeartService, false);
if(!result)
debug("Failed to find a Trixter X-Dream V1 Bike");
} else {
debug("Not looking for Trixter X-Dream V1 Bike - disabled in settings");
}

return result;
}

bool bluetooth::cscSensorAvaiable() {

QSettings settings;
Expand Down Expand Up @@ -338,6 +396,8 @@ void bluetooth::deviceDiscovered(const QBluetoothDeviceInfo &device) {
QString proformtreadmillip = settings.value(QStringLiteral("proformtreadmillip"), "").toString();
QString nordictrack_2950_ip = settings.value(QStringLiteral("nordictrack_2950_ip"), "").toString();



if (!heartRateBeltFound) {

heartRateBeltFound = heartRateBeltAvaiable();
Expand Down Expand Up @@ -1918,9 +1978,8 @@ void bluetooth::restart() {
QSettings settings;

if (onlyDiscover) {

onlyDiscover = false;
discoveryAgent->start();
this->startDiscovery();
return;
}

Expand Down Expand Up @@ -2356,7 +2415,11 @@ void bluetooth::restart() {
delete eliteSterzoSmart;
eliteSterzoSmart = nullptr;
}
discoveryAgent->start();
if (trixterXDreamV1Bike) {
delete trixterXDreamV1Bike;
trixterXDreamV1Bike = nullptr;
}
this->startDiscovery();
}

bluetoothdevice *bluetooth::device() {
Expand Down Expand Up @@ -2507,7 +2570,10 @@ bluetoothdevice *bluetooth::device() {
return fitPlusBike;
} else if (skandikaWiriBike) {
return skandikaWiriBike;
} else if (trixterXDreamV1Bike){
return trixterXDreamV1Bike;
}

return nullptr;
}

Expand Down
30 changes: 28 additions & 2 deletions src/bluetooth.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
#include "templateinfosenderbuilder.h"
#include "toorxtreadmill.h"
#include "treadmill.h"
#include "trixterxdreamv1bike.h"
#include "truetreadmill.h"
#include "trxappgateusbbike.h"
#include "trxappgateusbtreadmill.h"
Expand All @@ -120,7 +121,23 @@ class bluetooth : public QObject, public SignalHandler {
bool onlyDiscover = false;
TemplateInfoSenderBuilder *getUserTemplateManager() const { return userTemplateManager; }
TemplateInfoSenderBuilder *getInnerTemplateManager() const { return innerTemplateManager; }
protected:
/**
* @brief startDiscovery Start the Bluetooth docscovery agent and the thread that discovers non-bluetooth devices.
drmason789 marked this conversation as resolved.
Show resolved Hide resolved
*/
void startDiscovery();

/**
* @brief discoverNonBluetoothDevices Discover non-bluetooth devices and create an object for the first.
* @return An object for the first non-bluetooth device found.
*/
bluetoothdevice * discoverNonBluetoothDevices();

/**
* @brief nonBluetoothDeviceDiscovery Called by the non-bluetooth discovery thread to identify using
* discoverNonBluetoothDevices() and connect non-Bluetooth devices.
*/
void nonBluetoothDeviceDiscovery();
private:
TemplateInfoSenderBuilder *userTemplateManager = nullptr;
TemplateInfoSenderBuilder *innerTemplateManager = nullptr;
Expand Down Expand Up @@ -209,6 +226,7 @@ class bluetooth : public QObject, public SignalHandler {
fakeelliptical *fakeElliptical = nullptr;
QList<fitmetria_fanfit *> fitmetriaFanfit;
QString filterDevice = QLatin1String("");
trixterxdreamv1bike * trixterXDreamV1Bike = nullptr;

bool testResistance = false;
bool noWriteResistance = false;
Expand All @@ -231,11 +249,18 @@ class bluetooth : public QObject, public SignalHandler {
bool eliteSterzoSmartAvaiable();
bool fitmetria_fanfit_isconnected(QString name);

/**
* @brief findTrixterXDreamV1Bike Searches serial ports for a Trixter X-Dream V1 Bike
* @param settings The application settings.
* @return A trixterxdreamv1bike object if a bike has been found, nullptr otherwise.
*/
class trixterxdreamv1bike * findTrixterXDreamV1Bike(const QSettings& settings);

#ifdef Q_OS_WIN
QTimer discoveryTimeout;
#endif

signals:
signals:
void deviceConnected(QBluetoothDeviceInfo b);
void deviceFound(QString name);
void searchingStop();
Expand All @@ -257,7 +282,8 @@ class bluetooth : public QObject, public SignalHandler {
void inclinationChanged(double, double);
void connectedAndDiscovered();

signals:
signals:

};

#endif // BLUETOOTH_H
11 changes: 11 additions & 0 deletions src/qdomyos-zwift.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ QT += bluetooth widgets xml positioning quick networkauth websockets texttospeec
QTPLUGIN += qavfmediaplayer
QT+= charts

windows: QT += serialport
unix:!android: QT += serialport

unix:android: QT += androidextras gui-private
qtHaveModule(httpserver) {
QT += httpserver
Expand Down Expand Up @@ -219,6 +222,10 @@ SOURCES += \
stagesbike.cpp \
toorxtreadmill.cpp \
treadmill.cpp \
trixterxdreamv1bike.cpp \
trixterxdreamv1client.cpp \
trixterxdreamv1serial.cpp \
trixterxdreamv1settings.cpp \
truetreadmill.cpp \
trxappgateusbbike.cpp \
ultrasportbike.cpp \
Expand Down Expand Up @@ -617,6 +624,10 @@ HEADERS += \
treadmill.h \
mainwindow.h \
trainprogram.h \
trixterxdreamv1bike.h \
trixterxdreamv1client.h \
trixterxdreamv1serial.h \
trixterxdreamv1settings.h \
truetreadmill.h \
trxappgateusbbike.h \
trxappgateusbtreadmill.h \
Expand Down
Loading