diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2019-11-13 15:23:16 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2019-11-13 15:23:16 +0100 |
| commit | 974ec8c737647b2c46f6962992b95f739432a7d4 (patch) | |
| tree | d04c407ddf9f77d158c1df9301ca8e6264c5b76b /Kod | |
| parent | c2ce165db06ac1e39221b5a8d788c0b49998111e (diff) | |
| download | tfyy51-974ec8c737647b2c46f6962992b95f739432a7d4.tar.gz | |
add control signal log
Diffstat (limited to 'Kod')
| -rw-r--r-- | Kod/bilbana/yc4/main.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Kod/bilbana/yc4/main.m b/Kod/bilbana/yc4/main.m index d79194d..f7fc66b 100644 --- a/Kod/bilbana/yc4/main.m +++ b/Kod/bilbana/yc4/main.m @@ -119,6 +119,14 @@ while 1 % DISPLAY display.send_delay = tic; if toc(display.last_send) > display.send_interval + % queue control signal + if car1.running && car1.automatic + display.data = [display.data, put_text(80, 16 + (16 * 1), 'L', num2str(car1.u))]; + end + if car2.running && car2.automatic + display.data = [display.data, put_text(80, 16 + (16 * 2), 'L', num2str(car2.u))]; + end + % send all queued data if ~isempty(display.data) [display.out] = matlabclient(1, get_smallpackage(display.data)); |
