summaryrefslogtreecommitdiffstats
path: root/Kod/display
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-10-20 14:36:29 +0200
committerGustav Sörnäs <gusso230@student.liu.se>2019-10-20 14:36:29 +0200
commitc8d4d70b17cd7a56dd48cb94b3831e52f8d56dc9 (patch)
tree4a0e1b2864cae60f260101644c176ac2d5ab80d3 /Kod/display
parent1111d306f96fbe7d1608e1eaa156680fd5b21ecf (diff)
parentc4033991d6363441bf4697608034edb39ff50fe5 (diff)
downloadtfyy51-c8d4d70b17cd7a56dd48cb94b3831e52f8d56dc9.tar.gz
Merge branch 'freeze_gustav' into freeze
# Conflicts: # Kod/bilbana/yc4/main.m
Diffstat (limited to 'Kod/display')
-rw-r--r--Kod/display/display_exempel.m114
1 files changed, 57 insertions, 57 deletions
diff --git a/Kod/display/display_exempel.m b/Kod/display/display_exempel.m
index c920087..5ac7cb0 100644
--- a/Kod/display/display_exempel.m
+++ b/Kod/display/display_exempel.m
@@ -10,24 +10,24 @@ cd ClientServerApp\Release
!startServer
cd ../..
%% Diagonal linje
-DC1 = 17;
-ESC = 27;
-Code = 'GD';
-
-% x1, y1, x2, y2, (320 x 240 pixlar)
-% minst signifikanta bitar till vänster
-% mest signifikanta bitar till höger
-arg = [0, 0, 0, 0, 63, 1, 239, 0];
-
-% Save the 'small package' as a string
-data = [ESC, double(Code), arg];
-len = length(data);
-initStr = [DC1, len, data];
-bcc = mod(sum(initStr), 256);
-str = [initStr, bcc];
-
-% Skriv
-matlabclient(1, str')
+% DC1 = 17;
+% ESC = 27;
+% Code = 'GD';
+%
+% % x1, y1, x2, y2, (320 x 240 pixlar)
+% % minst signifikanta bitar till vänster
+% % mest signifikanta bitar till höger
+% arg = [0, 0, 0, 0, 63, 1, 239, 0];
+%
+% % Save the 'small package' as a string
+% data = [ESC, double(Code), arg];
+% len = length(data);
+% initStr = [DC1, len, data];
+% bcc = mod(sum(initStr), 256);
+% str = [initStr, bcc];
+%
+% % Skriv
+% matlabclient(1, str')
%% Rita en rektangel som är fylld med mönster
DC1 = 17;
@@ -53,30 +53,30 @@ str = [initStr, bcc];
matlabclient(1, str')
%% Skriv en Test-sträng
-DC1 = 17;
-ESC = 27;
-Code = double('ZL');
-
-% x1, y1, (320 x 240 pixlar)
-% minst signifikanta bitar till vänster
-% mest signifikanta bitar till höger
-arg1 = [117, 0, 32, 0];
-
-% Textsträng
-%arg2 = 'Test';
-
-arg2 = 'DISPLAY!!!!!';
-
-% Null
-arg3 = 0;
-
-
-% Save the 'small package' as a string
-data = [ESC, double(Code), arg1, double(arg2), arg3];
-len = length(data);
-initStr = [DC1, len, data];
-bcc = mod(sum(initStr), 256);
-str = [initStr, bcc];
+% DC1 = 17;
+% ESC = 27;
+% Code = double('ZL');
+%
+% % x1, y1, (320 x 240 pixlar)
+% % minst signifikanta bitar till vänster
+% % mest signifikanta bitar till höger
+% arg1 = [117, 0, 32, 0];
+%
+% % Textsträng
+% %arg2 = 'Test';
+%
+% arg2 = 'DISPLAY!!!!!';
+%
+% % Null
+% arg3 = 0;
+%
+%
+% % Save the 'small package' as a string
+% data = [ESC, double(Code), arg1, double(arg2), arg3];
+% len = length(data);
+% initStr = [DC1, len, data];
+% bcc = mod(sum(initStr), 256);
+% str = [initStr, bcc];
% Skriv
matlabclient(1, str')
@@ -142,20 +142,20 @@ matlabclient(1, str')
%fwrite(lcd, str)
%% Radera Displayen
-DC1 = 17;
-ESC = 27;
-Code = 'DL';
-
-% Save the 'small package' as a string
-data = [ESC, double(Code)];
-len = length(data);
-initStr = [DC1, len, data];
-bcc = mod(sum(initStr), 256);
-str = [initStr, bcc];
-
-% Skriv
-matlabclient(1, str')
-%fwrite(lcd, str)
+% DC1 = 17;
+% ESC = 27;
+% Code = 'DL';
+%
+% % Save the 'small package' as a string
+% data = [ESC, double(Code)];
+% len = length(data);
+% initStr = [DC1, len, data];
+% bcc = mod(sum(initStr), 256);
+% str = [initStr, bcc];
+%
+% % Skriv
+% matlabclient(1, str')
+% %fwrite(lcd, str)
%% Avsluta kommunikation med display
-matlabclient(3); \ No newline at end of file
+matlabclient(3);