struct rc_proto_hello *rch =
(struct rc_proto_hello *) recvframe->data;
- NOTICE(E_USER_XBEE, "recv hello len=%d", rch->datalen);
+ NOTICE(E_USER_RC_PROTO, "recv hello len=%d", rch->datalen);
stats.hello_rx++;
return 0;
}
(struct rc_proto_echo_req *) recvframe->data;
int8_t power = rce->power;
- NOTICE(E_USER_XBEE, "recv echo len=%d", rce->datalen);
+ NOTICE(E_USER_RC_PROTO, "recv echo len=%d", rce->datalen);
stats.echo_req_rx++;
if (rc_proto_send_echo_ans(ntohll(recvframe->srcaddr),
(struct rc_proto_echo_ans *) recvframe->data;
uint16_t diff;
- NOTICE(E_USER_XBEE, "recv echo_ans len=%d", rce->datalen);
+ NOTICE(E_USER_RC_PROTO, "recv echo_ans len=%d", rce->datalen);
stats.echo_ans_rx++;
diff = get_time_ms() - rce->timestamp;
stats.echo_ans_latency_sum += diff;
struct rc_proto_power_probe *rcpb =
(struct rc_proto_power_probe *) recvframe->data;
- NOTICE(E_USER_XBEE, "recv power_probe");
+ NOTICE(E_USER_RC_PROTO, "recv power_probe");
if (datalen != sizeof(*rcpb))
return -1;
struct rc_proto_ack *rca =
(struct rc_proto_ack *) recvframe->data;
- NOTICE(E_USER_XBEE, "recv ack, ack=%d", rca->seq);
+ NOTICE(E_USER_RC_PROTO, "recv ack, ack=%d", rca->seq);
stats.ack_rx++;
return 0;
}
struct rc_proto_servo *rcs =
(struct rc_proto_servo *) recvframe->data;
- NOTICE(E_USER_XBEE, "recv servo");
+ NOTICE(E_USER_RC_PROTO, "recv servo");
if (datalen != RC_PROTO_SERVO_LEN)
return -1;
struct rc_proto_stats *rcs =
(struct rc_proto_stats *) recvframe->data;
- NOTICE(E_USER_XBEE, "recv stats");
+ NOTICE(E_USER_RC_PROTO, "recv stats");
if (datalen != sizeof(*rcs) + sizeof(peer_stats))
return -1;
struct rc_proto_gps_pos *rcmsg =
(struct rc_proto_gps_pos *) recvframe->data;
- NOTICE(E_USER_XBEE, "recv gps_pos");
-
if (datalen != sizeof(*rcmsg))
return -1;
stats.gps_pos_rx++;
- printf_P(PSTR("GPS received valid=%d %"PRIu32" %"
- PRIu32" %"PRIu32"\n"),
+ NOTICE(E_USER_RC_PROTO, "GPS received valid=%d %"PRIu32" %"
+ PRIu32" %"PRIu32,
rcmsg->valid, rcmsg->latitude, rcmsg->longitude,
rcmsg->altitude);
return 0;
struct rc_proto_imu_pos *rcmsg =
(struct rc_proto_imu_pos *) recvframe->data;
- NOTICE(E_USER_XBEE, "recv imu_pos");
-
if (datalen != sizeof(*rcmsg))
return -1;
stats.imu_pos_rx++;
- printf_P(PSTR("IMU received %d %d %d\n"),
+ NOTICE(E_USER_RC_PROTO,
+ "IMU received %d %d %d",
rcmsg->roll, rcmsg->pitch, rcmsg->yaw);
return 0;
}