|
7 | 7 | #include <XBeeApi.h> |
8 | 8 | #include <Timer.h> |
9 | 9 |
|
10 | | - |
11 | | -#define XBEE_AT_GUARD_TIME (1200UL) // Wait time before sending AT attention string and receiving "OK" |
12 | | -#define XBEE_AT_COMMAND_TIMEOUT (5000UL) // Time to wait for "OK" response to AT command before giving up |
13 | | -#define XBEE_REMOTE_HANDSHAKE_TIMEOUT (3000UL) // Maximum time to wait for rotator to acknowledge the hello message. |
14 | | -#define XBEE_ASSOCIATE_TIMEOUT (20000UL) // Maximum time to wait for shutter to associate with a coordinator. |
15 | | -#define XBEE_DETECT_SHUTTER_TIMEOUT (60000UL) // Maximum time to wait for the shutter to say hello. |
16 | | -#define XBEE_HEARTBEAT_INTERVAL (8000UL) // How often the shutter sends a 'heartbeat' message |
17 | | -#define XBEE_NO_HEARTBEAT_TIMEOUT ( 17000UL) // How long to wait for a heartbeat before assuming the link is down |
18 | | -#define XBEE_HELLO_MESSAGE "Yoohoo" // A retro shout-out to FidoNet era mailer called dBridge. |
19 | | -#define XBEE_HELLO_ACK "2U2" // (yes I am old enough to remember FidoNet). |
20 | | -#define XBEE_ATTENTION "+++" // Guard Time + Attention + Guard Time reverts XBee to AT Command Mode |
| 10 | +constexpr Duration XBEE_AT_GUARD_TIME = Timer::Milliseconds(1200); // Wait time before sending AT attention string and receiving "OK" |
| 11 | +constexpr Duration XBEE_AT_COMMAND_TIMEOUT = Timer::Seconds(5); // Time to wait for "OK" response to AT command before giving up |
| 12 | +constexpr Duration XbeeInterAtCommandDelay = Timer::Milliseconds(100); |
| 13 | +constexpr Duration XBEE_REMOTE_HANDSHAKE_TIMEOUT = Timer::Seconds(3); // Maximum time to wait for rotator to acknowledge the hello message. |
| 14 | +constexpr Duration XBEE_ASSOCIATE_TIMEOUT = Timer::Seconds(20); // Maximum time to wait for shutter to associate with a coordinator. |
| 15 | +constexpr Duration XBEE_DETECT_SHUTTER_TIMEOUT = Timer::Seconds(60); // Maximum time to wait for the shutter to say hello. |
| 16 | +constexpr Duration XBEE_HEARTBEAT_INTERVAL = Timer::Seconds(8); // How often the shutter sends a 'heartbeat' message |
| 17 | +constexpr Duration XBEE_NO_HEARTBEAT_TIMEOUT = Timer::Seconds(17); // How long to wait for a heartbeat before assuming the link is down |
| 18 | +#define XBEE_HELLO_MESSAGE "Yoohoo" // A retro shout-out to FidoNet era mailer called dBridge. |
| 19 | +#define XBEE_HELLO_ACK "2U2" // (yes I am old enough to remember FidoNet). |
| 20 | +#define XBEE_ATTENTION "+++" // Guard Time + Attention + Guard Time reverts XBee to AT Command Mode |
21 | 21 |
|
22 | 22 | class IXBeeState; |
23 | 23 |
|
|
0 commit comments