Skip to content

Commit

Permalink
Use the Tacx Genius frequency, period & device type from fluxoid http…
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeymclellan committed Sep 28, 2020
1 parent 6a61ca6 commit b783dfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pythoncode/FortiusAntBody.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def LocateHW(self):
#---------------------------------------------------------------------------
if debug.on(debug.Application): logfile.Write ("Scan for hardware - end")
# 2020-09-28
return ((AntDongle.OK or (not clv.Tacx_iVortex AND (clv.manual or clv.manualgrade))) \
return ((AntDongle.OK or (not clv.Tacx_iVortex and (clv.manual or clv.manualgrade))) \
and TacxTrainer.OK)

# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -1162,4 +1162,4 @@ def Tacx2DongleSub(self, Restart):
AntDongle.ResetDongle()
TacxTrainer.SendToTrainer(True, usbTrainer.modeStop)

return True
return True
8 changes: 5 additions & 3 deletions pythoncode/antDongle.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
DeviceTypeID_HRM = DeviceTypeID_heart_rate
DeviceTypeID_PWR = DeviceTypeID_bike_power
DeviceTypeID_SCS = DeviceTypeID_bike_speed_cadence
DeviceTypeID_GNS = 0xd3 # Tacx i-Genius
DeviceTypeID_VTX = 61 # Tacx i-Vortex
# 0x3d according TotalReverse
DeviceTypeID_VHU = 0x3e # Thanks again to TotalReverse
Expand All @@ -242,6 +243,7 @@
# 0x04 = Global datapages used
TransmitPower_0dBm = 0x03 # 9.4.3 Output Power Level Settings
RfFrequency_2457Mhz = 57 # 9.5.2.6 Channel RF Frequency
RfFrequency_2460Mhz = 60 # used for Tacx i-Genius only
RfFrequency_2466Mhz = 66 # used for Tacx i-Vortex only
RfFrequency_2478Mhz = 0x4e # used for Tacx i-Vortex Headunit
#---------------------------------------------------------------------------
Expand Down Expand Up @@ -764,9 +766,9 @@ def SlaveVTX_ChannelConfig(self, DeviceNumber): # Listen to a Tacx i-Vortex
if debug.on(debug.Data1): logfile.Write ("SlaveVTX_ChannelConfig()")
messages=[
msg42_AssignChannel (channel_VTX_s, ChannelType_BidirectionalReceive, NetworkNumber=0x01),
msg51_ChannelID (channel_VTX_s, DeviceNumber, DeviceTypeID_VTX, TransmissionType_IC),
msg45_ChannelRfFrequency (channel_VTX_s, RfFrequency_2466Mhz),
msg43_ChannelPeriod (channel_VTX_s, ChannelPeriod=0x2000),
msg51_ChannelID (channel_VTX_s, DeviceNumber, DeviceTypeID_GNS, TransmissionType_IC),
msg45_ChannelRfFrequency (channel_VTX_s, RfFrequency_2460Mhz),
msg43_ChannelPeriod (channel_VTX_s, ChannelPeriod=4096),
msg60_ChannelTransmitPower (channel_VTX_s, TransmitPower_0dBm),
msg4B_OpenChannel (channel_VTX_s),
msg4D_RequestMessage (channel_VTX_s, msgID_ChannelID)
Expand Down

0 comments on commit b783dfc

Please sign in to comment.