diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2019-11-12 12:34:14 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2019-11-12 12:34:14 +0100 |
| commit | ca01e2e6e69fd702ed2f4cf56d6323593bea3278 (patch) | |
| tree | a66c054d38ebd37364f84222a0a618894608a4dd /Kod/bilbana/yc4/display/get_response.m | |
| parent | 984296b90a2ddcb8bbf913b9ac97d1be2045bfab (diff) | |
| download | tfyy51-ca01e2e6e69fd702ed2f4cf56d6323593bea3278.tar.gz | |
Add test IO
Diffstat (limited to 'Kod/bilbana/yc4/display/get_response.m')
| -rw-r--r-- | Kod/bilbana/yc4/display/get_response.m | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Kod/bilbana/yc4/display/get_response.m b/Kod/bilbana/yc4/display/get_response.m new file mode 100644 index 0000000..9714a43 --- /dev/null +++ b/Kod/bilbana/yc4/display/get_response.m @@ -0,0 +1,34 @@ +function [ack, start_code, data] get_response(display_data) +% GET RESPONSE +% In-depth explanation +% [flag, display_data] = matlabclient(2) + +ack = false; +start_code = ''; +data = []; + +len = -1; + +if display_data[0] == 6 + ack = true; +else + return +end + +display_data[0] = []; + +if display_data[0] == 17 + start_code = 'DC1'; +elseif display_data[0] == 18 + start_code = 'DC2'; +end + +display_data[0] = []; + +len = display_data[0]; + +while len > 0 + +end + +end |
