Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: decawave_network.cpp
- Revision:
- 8:a69bdc60d93e
- Parent:
- 7:bdfcc94be056
- Child:
- 10:b5672b451e2e
diff -r bdfcc94be056 -r a69bdc60d93e decawave_network.cpp
--- a/decawave_network.cpp Thu Jun 01 17:58:50 2017 +0000
+++ b/decawave_network.cpp Thu Jun 01 18:33:39 2017 +0000
@@ -8,7 +8,6 @@
rxTimestamp = 0;
timediffRec = 0;
timediffSend = 0;
- curr_mode = 1;
for (int i = 0; i < MAX_NODES; i++)
acknowledgement[i] = true;
@@ -229,9 +228,13 @@
if(msg.msgid == MAVLINK_MSG_ID_HEARTBEAT) {
mavlink_heartbeat_t hb_msg;
mavlink_msg_heartbeat_decode(&msg,&hb_msg);
- //printf("System ID %d Comp ID %d \r\n",msg.sysid,msg.compid);
+ printf("System ID %d Comp ID %d Base Mode %d\r\n",msg.sysid,msg.compid,hb_msg.base_mode);
nodes_in_range[msg.sysid]= msg.compid;
- last_heartbeat[msg.sysid]=LocalTimer.read();
+ last_heartbeat[msg.sysid]=LocalTimer.read();
+
+ if(msg.compid == MASTER){
+ curr_mode = hb_msg.base_mode;
+ }
// dwm_LED = !dwm_LED;
}
/* if(msg.msgid==MAVLINK_MSG_ID_FUSED_IMU) {