summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRALOVICH, Kristof <tade60@freemail.hu>2014-01-06 21:32:06 +0100
committerRALOVICH, Kristof <tade60@freemail.hu>2014-01-06 21:32:06 +0100
commit19256fa1b5bdbec20d566a494e22053193e829df (patch)
treec9cf7e3270b1f0c21aa97ed64ff562823efc05cd
parentf4a3bd78058cda9272ad1703412f5b71422565ec (diff)
It helps to delay the host from writing to device too fast.
Noticed that a small static delay can help pace the host, and allow faster overall communication with the device. Sometimes we were sending ANTFS messages/replies too fast.
-rw-r--r--src/AntFr310XT.cpp1
-rw-r--r--src/AntFr405.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/AntFr310XT.cpp b/src/AntFr310XT.cpp
index fe81490..ceb7605 100644
--- a/src/AntFr310XT.cpp
+++ b/src/AntFr310XT.cpp
@@ -391,6 +391,7 @@ AntFr310XT::handleEvents()
m_ds->loadDefaultValues();
m_ds->loadFromFile(m_ds->getConfigFileName());
m_ds->saveToFile(m_ds->getConfigFileName());
+ m_serial->setWriteDelay(m_ds->SerialWriteDelayMs);
readUInt64(clientSN, pairedKey);
diff --git a/src/AntFr405.cpp b/src/AntFr405.cpp
index b3dc1ad..598bb66 100644
--- a/src/AntFr405.cpp
+++ b/src/AntFr405.cpp
@@ -392,6 +392,7 @@ AntFr405::handleEvents()
m_ds->loadDefaultValues();
m_ds->loadFromFile(m_ds->getConfigFileName());
m_ds->saveToFile(m_ds->getConfigFileName());
+ m_serial->setWriteDelay(m_ds->SerialWriteDelayMs);
readUInt64(clientSN, pairedKey);