forked from things-nyc/arduino-lmic
-
Notifications
You must be signed in to change notification settings - Fork 227
Closed
Labels
Description
Current version of scan_mac_cmds() sets up bitmaps and "ans" fields as it scans the mac commands. Then buildDataFrame() uses the bits and the answers to create reply fields. But this means:
- responses are not guaranteed to be in same order as requests
- it's hard to have multiple responses to repeated requests.
Solution is to create a dedicated buffer for mac responses. It looks pretty easy; build it in scan_mac_cmds(), then prepend to the buffer in buildDataFrame(). We can then rip out all the flags and so forth; net size will be almost a wash.