From 960a716bceeeb0fbf58dec1859725a070d486f74 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Wed, 30 Apr 2008 13:20:03 +0200 Subject: * host/inter, digital/io/src: - added computed path drawing. --- digital/io/src/simu.host.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'digital/io/src/simu.host.c') diff --git a/digital/io/src/simu.host.c b/digital/io/src/simu.host.c index 03eed76a..7a497bff 100644 --- a/digital/io/src/simu.host.c +++ b/digital/io/src/simu.host.c @@ -39,6 +39,7 @@ enum MSG_SIMU_IO_COLOR = 0xb1, MSG_SIMU_IO_SERVO = 0xb2, MSG_SIMU_IO_SHARPS = 0xb3, + MSG_SIMU_IO_PATH = 0xb4, }; /** Requested servo position. */ @@ -194,3 +195,16 @@ void eeprom_clear_param (void) { } + +/** Send computed path. */ +void +simu_send_path (uint8_t len, uint16_t *points) +{ + int i; + mex_msg_t *m; + m = mex_msg_new (MSG_SIMU_IO_PATH); + for (i = 0; i < len; i++) + mex_msg_push (m, "h", points[i]); + mex_node_send (m); +} + -- cgit v1.2.3