summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/simu.host.c
diff options
context:
space:
mode:
Diffstat (limited to 'digital/io/src/simu.host.c')
-rw-r--r--digital/io/src/simu.host.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/digital/io/src/simu.host.c b/digital/io/src/simu.host.c
index 5b1da61f..134d0ba4 100644
--- a/digital/io/src/simu.host.c
+++ b/digital/io/src/simu.host.c
@@ -44,6 +44,7 @@ enum
MSG_SIMU_IO_PATH = 0xb4,
MSG_SIMU_IO_PWM = 0xb5,
MSG_SIMU_IO_CONTACT = 0xb6,
+ MSG_SIMU_IO_POS_REPORT = 0xb7,
};
/** Requested servo position. */
@@ -243,3 +244,14 @@ simu_send_path (uint16_t *points, uint8_t len,
mex_node_send (m);
}
+void
+simu_send_pos_report (vect_t *pos, uint8_t pos_nb, uint8_t id)
+{
+ mex_msg_t *m;
+ m = mex_msg_new (MSG_SIMU_IO_POS_REPORT);
+ mex_msg_push (m, "b", id);
+ for (; pos_nb; pos++, pos_nb--)
+ mex_msg_push (m, "hh", pos->x, pos->y);
+ mex_node_send (m);
+}
+