Merge pull request #381 from oliverschmidt/master
Reverted commit below as the cc65 bug in question is fixed.
This commit is contained in:
commit
35e93f3bae
|
@ -187,8 +187,8 @@ print_local_stats(struct stats *s)
|
||||||
printf(" Total transfer time: %lu.%02lu seconds, %lu.%02lu packets/second\n",
|
printf(" Total transfer time: %lu.%02lu seconds, %lu.%02lu packets/second\n",
|
||||||
(s->end - s->start) / CLOCK_SECOND,
|
(s->end - s->start) / CLOCK_SECOND,
|
||||||
((10 * (s->end - s->start)) / CLOCK_SECOND) % 10,
|
((10 * (s->end - s->start)) / CLOCK_SECOND) % 10,
|
||||||
((s->sent * 1UL * CLOCK_SECOND) / (s->end - s->start)),
|
((1UL * CLOCK_SECOND * s->sent) / (s->end - s->start)),
|
||||||
(((s->sent * 100UL * CLOCK_SECOND) / (s->end - s->start)) % 100));
|
(((100UL * CLOCK_SECOND * s->sent) / (s->end - s->start)) % 100));
|
||||||
|
|
||||||
printf(" Average round-trip-time: %lu ms (%lu + %lu)\n",
|
printf(" Average round-trip-time: %lu ms (%lu + %lu)\n",
|
||||||
(1000 * (s->total_rx_latency + s->total_tx_latency) / s->received) /
|
(1000 * (s->total_rx_latency + s->total_tx_latency) / s->received) /
|
||||||
|
@ -206,8 +206,8 @@ print_local_stats(struct stats *s)
|
||||||
((10000 * (s->power.tx - s->power0.tx))/total_time) % 100);
|
((10000 * (s->power.tx - s->power0.tx))/total_time) % 100);
|
||||||
|
|
||||||
printf(" Packets received: %d.%lu%%, %d of %d\n",
|
printf(" Packets received: %d.%lu%%, %d of %d\n",
|
||||||
s->received * 100 / s->sent,
|
100 * s->received / s->sent,
|
||||||
(s->received * 10000L / s->sent) % 10,
|
(10000L * s->received / s->sent) % 10,
|
||||||
s->received, s->sent);
|
s->received, s->sent);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -141,7 +141,7 @@ recv_ruc(struct runicast_conn *c, const rimeaddr_t *from, uint8_t seqno)
|
||||||
|
|
||||||
printf("runicast message received from %d.%d, latency %lu ms, seqno %d, data '%.*s'\n",
|
printf("runicast message received from %d.%d, latency %lu ms, seqno %d, data '%.*s'\n",
|
||||||
from->u8[0], from->u8[1],
|
from->u8[0], from->u8[1],
|
||||||
(latency * 1000L) / RTIMER_ARCH_SECOND,
|
(1000L * latency) / RTIMER_ARCH_SECOND,
|
||||||
seqno,
|
seqno,
|
||||||
packetbuf_datalen() - COLLECT_MSG_HDRSIZE,
|
packetbuf_datalen() - COLLECT_MSG_HDRSIZE,
|
||||||
msg->data);
|
msg->data);
|
||||||
|
|
|
@ -129,7 +129,7 @@ recv_broadcast(struct broadcast_conn *c, const rimeaddr_t *from)
|
||||||
|
|
||||||
printf("broadcast message received from %d.%d, latency %lu ms, data '%.*s'\n",
|
printf("broadcast message received from %d.%d, latency %lu ms, data '%.*s'\n",
|
||||||
from->u8[0], from->u8[1],
|
from->u8[0], from->u8[1],
|
||||||
(latency * 1000L) / RTIMER_ARCH_SECOND,
|
(1000L * latency) / RTIMER_ARCH_SECOND,
|
||||||
packetbuf_datalen() - COLLECT_MSG_HDRSIZE,
|
packetbuf_datalen() - COLLECT_MSG_HDRSIZE,
|
||||||
msg->data);
|
msg->data);
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ recv_uc(struct unicast_conn *c, const rimeaddr_t *from)
|
||||||
|
|
||||||
printf("unicast message received from %d.%d, latency %lu ms, data '%.*s'\n",
|
printf("unicast message received from %d.%d, latency %lu ms, data '%.*s'\n",
|
||||||
from->u8[0], from->u8[1],
|
from->u8[0], from->u8[1],
|
||||||
(latency * 1000L) / RTIMER_ARCH_SECOND,
|
(1000L * latency) / RTIMER_ARCH_SECOND,
|
||||||
packetbuf_datalen() - COLLECT_MSG_HDRSIZE,
|
packetbuf_datalen() - COLLECT_MSG_HDRSIZE,
|
||||||
msg->data);
|
msg->data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,9 +145,9 @@ recv_mesh(struct mesh_conn *c, const rimeaddr_t *from, uint8_t hops)
|
||||||
pingrecvtime = rtimer_arch_now();
|
pingrecvtime = rtimer_arch_now();
|
||||||
#endif
|
#endif
|
||||||
snprintf(buf, sizeof(buf), "%lu ms (%lu + %lu), %d hops.",
|
snprintf(buf, sizeof(buf), "%lu ms (%lu + %lu), %d hops.",
|
||||||
((pingrecvtime - ping.pingtime) * 1000L) / RTIMER_ARCH_SECOND,
|
(1000L * (pingrecvtime - ping.pingtime)) / RTIMER_ARCH_SECOND,
|
||||||
((ping.pongtime - ping.pingtime) * 1000L) / RTIMER_ARCH_SECOND,
|
(1000L * (ping.pongtime - ping.pingtime)) / RTIMER_ARCH_SECOND,
|
||||||
((pingrecvtime - ping.pongtime) * 1000L) / RTIMER_ARCH_SECOND,
|
(1000L * (pingrecvtime - ping.pongtime)) / RTIMER_ARCH_SECOND,
|
||||||
hops);
|
hops);
|
||||||
|
|
||||||
shell_output_str(&rime_ping_command,
|
shell_output_str(&rime_ping_command,
|
||||||
|
|
Loading…
Reference in a new issue