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:
Anthony Merlino 2018-06-13 03:21:45 +00:00 committed by GregoryN
parent fd4398142c
commit 2f921fbe8e
2 changed files with 9 additions and 2 deletions

View File

@ -60,7 +60,7 @@
* Pre-processor Definitions
****************************************************************************/
#define XBEE_ATQUERY_TIMEOUT 100
#define XBEE_ATQUERY_TIMEOUT MSEC2TICK(100)
/****************************************************************************
* Private Types
@ -625,6 +625,11 @@ static void xbee_process_apiframes(FAR struct xbee_priv_s *priv,
wlinfo("Sleep Period: %dsec\n",
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
{
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, "A2");
xbee_send_atquery(priv, "SP");
xbee_send_atquery(priv, "RR");
}

View File

@ -55,7 +55,8 @@
****************************************************************************/
#define XBEE_ASSOC_POLLDELAY 100
#define XBEE_RESPONSE_TIMEOUT 100
#define XBEE_RESPONSE_TIMEOUT MSEC2TICK(100)
/****************************************************************************
* Private Types