summaryrefslogtreecommitdiff
path: root/robot/sim.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-05-27 12:53:42 +0200
committerlonkaars <loek@pipeframe.xyz>2022-05-27 12:53:42 +0200
commit4c4d045329c4a149bae0b53952c39c14243e1870 (patch)
tree18ce1a31adb20421635738d627b46150b1fb9fea /robot/sim.c
parent05318790dcbd6714a2adb3532e902a56a6638ca0 (diff)
throw error on noisy serial channel
Diffstat (limited to 'robot/sim.c')
-rw-r--r--robot/sim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/robot/sim.c b/robot/sim.c
index ba9aa4a..4efdc4d 100644
--- a/robot/sim.c
+++ b/robot/sim.c
@@ -105,7 +105,7 @@ void serial_send(char* message, unsigned int length) {
}
void serial_receive_ring(char* buffer, unsigned char size) {
- simprintfunc("serial_receive_ring", "0x%016llx, %u", (uint64_t) buffer, size);
+ simprintfunc("serial_receive_ring", PTR_FMT ", %u", (uint64_t) buffer, size);
}
unsigned char serial_get_received_bytes() {
@@ -170,7 +170,7 @@ unsigned char get_single_debounced_button_press(unsigned char buttons) {
}
void qtr_read(unsigned int* sensor_values, unsigned char read_mode) {
- simprintfunc("qtr_read", "0x%016llx, %s", (uint64_t) sensor_values, read_mode == QTR_EMITTERS_ON ? "QTR_EMITTERS_ON" : "???");
+ simprintfunc("qtr_read", PTR_FMT ", %s", (uint64_t) sensor_values, read_mode == QTR_EMITTERS_ON ? "QTR_EMITTERS_ON" : "???");
sensor_values[0] = 0;
sensor_values[1] = 0;
sensor_values[2] = 0;