summaryrefslogtreecommitdiffstats
path: root/Kod
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-10-27 14:26:09 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-10-30 20:01:42 +0100
commit47394320ad1e33f9a0302b6fa814ede543eba0ac (patch)
treef45594df3e81805c72d8bb49bedb104d88179f97 /Kod
parent9be4f7bff82a4a973c230dcfb43fabc07f1bf59d (diff)
downloadtfyy51-47394320ad1e33f9a0302b6fa814ede543eba0ac.tar.gz
Second wave
Diffstat (limited to 'Kod')
-rw-r--r--Kod/bilbana/yc4/display/define_touch_key.m7
-rw-r--r--Kod/bilbana/yc4/display/define_touch_switch.m7
-rw-r--r--Kod/bilbana/yc4/display/restore_display_from_clipboard_to_point.m5
-rw-r--r--Kod/bilbana/yc4/display/set_touch_sound_response.m7
4 files changed, 26 insertions, 0 deletions
diff --git a/Kod/bilbana/yc4/display/define_touch_key.m b/Kod/bilbana/yc4/display/define_touch_key.m
new file mode 100644
index 0000000..14ee5ee
--- /dev/null
+++ b/Kod/bilbana/yc4/display/define_touch_key.m
@@ -0,0 +1,7 @@
+function pkg = define_touch_key(x1, y1, x2, y2, down_code, up_code, just, text)
+ arg_location = [get_bytes(x1), get_bytes(y1), get_bytes(x2), get_bytes(y2)];
+ arg_text = double(strjoin({just; text}, ''));
+ arg_null = 0;
+
+ pkg = get_package('AT', [arg_location, down_code, up_code, arg_text, arg_null]);
+end
diff --git a/Kod/bilbana/yc4/display/define_touch_switch.m b/Kod/bilbana/yc4/display/define_touch_switch.m
new file mode 100644
index 0000000..47d3cd9
--- /dev/null
+++ b/Kod/bilbana/yc4/display/define_touch_switch.m
@@ -0,0 +1,7 @@
+function pkg = define_touch_key(x1, y1, x2, y2, down_code, up_code, just, text)
+ arg_location = [get_bytes(x1), get_bytes(y1), get_bytes(x2), get_bytes(y2)];
+ arg_text = double(strjoin({just; text}, ''));
+ arg_null = 0;
+
+ pkg = get_package('AK', [arg_location, down_code, up_code, arg_text, arg_null]);
+end
diff --git a/Kod/bilbana/yc4/display/restore_display_from_clipboard_to_point.m b/Kod/bilbana/yc4/display/restore_display_from_clipboard_to_point.m
new file mode 100644
index 0000000..2c9e1aa
--- /dev/null
+++ b/Kod/bilbana/yc4/display/restore_display_from_clipboard_to_point.m
@@ -0,0 +1,5 @@
+function pkg = restore_display_from_clipboard_to_point(x1, y1)
+ arg = [get_bytes(x1), get_bytes(y1)];
+
+ pkg = get_package('CK', arg);
+end
diff --git a/Kod/bilbana/yc4/display/set_touch_sound_response.m b/Kod/bilbana/yc4/display/set_touch_sound_response.m
new file mode 100644
index 0000000..851eaf2
--- /dev/null
+++ b/Kod/bilbana/yc4/display/set_touch_sound_response.m
@@ -0,0 +1,7 @@
+function pkg = set_touch_sound_response(state)
+ if state == true
+ pkg = get_package('AS', [1]);
+ else
+ pkg = get_package('AS', [0]);
+ end
+end