summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRALOVICH, Kristof <tade60@freemail.hu>2014-01-19 19:41:12 +0100
committerRALOVICH, Kristof <tade60@freemail.hu>2014-01-19 19:41:12 +0100
commita07cff30b4307b51911ce0ed4be15a0ce0b3a157 (patch)
treef4a0898c6cb399dd6ba84c3490595f0072b197b4
parentc852d827bbe5e3b8f7761932ace79067c91a6af0 (diff)
fold in the GarminIntf states
-rw-r--r--src/AntFr310XT.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/AntFr310XT.cpp b/src/AntFr310XT.cpp
index 9d6f56b..566f224 100644
--- a/src/AntFr310XT.cpp
+++ b/src/AntFr310XT.cpp
@@ -472,7 +472,9 @@ AntFr310XT::handleEvents()
// channel status <>
CHECK_RETURN_FALSE_LOG_OK_DBG2(m_antMessenger->ANT_RequestMessage(chan, MESG_CHANNEL_STATUS_ID));
- if(mode==MD_DOWNLOAD_ALL || mode==MD_DIRECTORY_LISTING)
+ if(clientDevName=="Forerunner 405")
+ changeStateSafe(ST_ANTFS_GINTF_DL_CAPS);
+ else if(mode==MD_DOWNLOAD_ALL || mode==MD_DIRECTORY_LISTING)
changeStateSafe(ST_ANTFS_DL_DIRECTORY);
else if(mode==MD_DOWNLOAD_SINGLE_FILE)
changeStateSafe(ST_ANTFS_DL_SINGLE_FILE);
@@ -684,6 +686,27 @@ AntFr310XT::handleEvents()
changeStateSafe(ST_ANTFS_LAST);
}
+ else if(state==ST_ANTFS_GINTF_DL_CAPS)
+ {
+ // when authentication succeeds, State=Transport beacon arrives
+ //R 96.026 MESG_BROADCAST_DATA_ID chan=0x00 ANTFS_BEACON(0x43) Beacon=1Hz, pairing=disabled, upload=disabled, dataAvail=no, State=Transport, Auth=PasskeyAndPairingOnly
+ //R 124.999 MESG_BROADCAST_DATA_ID chan=0x00 ANTFS_BEACON(0x43) Beacon=1Hz, pairing=disabled, upload=disabled, dataAvail=no, State=Transport, Auth=PasskeyAndPairingOnly
+ //S 114.743 MESG_REQUEST_ID chan=0x00 reqMsgId=MESG_CHANNEL_STATUS_ID
+ //R 3.247 MESG_CHANNEL_STATUS_ID chan=00 chanSt=Tracking
+ //S 12.451 MESG_BURST_DATA_ID chan=0x00, seq=0, last=no ANTFS_CMD(0x44) ANTFS_CmdDirect fd=0xffff, offset=0x0000, data=0x0000
+ //R 1.546 MESG_BROADCAST_DATA_ID chan=0x00 ANTFS_BEACON(0x43) Beacon=1Hz, pairing=disabled, upload=disabled, dataAvail=no, State=Transport, Auth=PasskeyAndPairingOnly
+ //S 2.477 MESG_BURST_DATA_ID chan=0x00, seq=1, last=yes fe00000000000000 ........
+
+ CHECK_RETURN_FALSE_LOG_OK(m_antMessenger->ANTFS_Direct(chan, SwapDWord(0xfe00000000000000)));
+
+ CHECK_RETURN_FALSE_LOG_OK(m_antMessenger->ANTFS_Direct(chan, SwapDWord(0x06000200ff000000)));
+
+ // 06000200f8000000
+ CHECK_RETURN_FALSE_LOG_OK(m_antMessenger->ANTFS_Direct(chan, SwapDWord(0x06000200f8000000)));
+
+ // just exit
+ changeStateSafe(ST_ANTFS_LAST);
+ }
else if(state==ST_ANTFS_NODATA)
{
changeStateSafe(ST_ANTFS_LAST);