mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
Merged in antmerlino/nuttx/xbee-timeout-fix (pull request #656)
drivers/xbee: Fixes issue with timeouts. Timeouts were in ticks but should have been in ms. This caused false triggers of timeout causing redundant packets, etc. Approved-by: GregoryN <gnutt@nuttx.org>
This commit is contained in:
committed by
GregoryN
parent
fd4398142c
commit
2f921fbe8e
@@ -60,7 +60,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#define XBEE_ATQUERY_TIMEOUT 100
|
#define XBEE_ATQUERY_TIMEOUT MSEC2TICK(100)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
@@ -625,6 +625,11 @@ static void xbee_process_apiframes(FAR struct xbee_priv_s *priv,
|
|||||||
wlinfo("Sleep Period: %dsec\n",
|
wlinfo("Sleep Period: %dsec\n",
|
||||||
frame->io_data[frame->io_offset]/100);
|
frame->io_data[frame->io_offset]/100);
|
||||||
}
|
}
|
||||||
|
else if (memcmp(command, "RR", 2) == 0)
|
||||||
|
{
|
||||||
|
wlinfo("XBee Retries: %d\n",
|
||||||
|
frame->io_data[frame->io_offset]);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wlwarn("Unhandled AT Response: %.*s\n", 2, command);
|
wlwarn("Unhandled AT Response: %.*s\n", 2, command);
|
||||||
@@ -1557,4 +1562,5 @@ void xbee_regdump(FAR struct xbee_priv_s *priv)
|
|||||||
xbee_send_atquery(priv, "A1");
|
xbee_send_atquery(priv, "A1");
|
||||||
xbee_send_atquery(priv, "A2");
|
xbee_send_atquery(priv, "A2");
|
||||||
xbee_send_atquery(priv, "SP");
|
xbee_send_atquery(priv, "SP");
|
||||||
|
xbee_send_atquery(priv, "RR");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,8 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#define XBEE_ASSOC_POLLDELAY 100
|
#define XBEE_ASSOC_POLLDELAY 100
|
||||||
#define XBEE_RESPONSE_TIMEOUT 100
|
|
||||||
|
#define XBEE_RESPONSE_TIMEOUT MSEC2TICK(100)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
|
|||||||
Reference in New Issue
Block a user