SmartGPU2-LCD480X320Touch-CommandSet

SMART GPU 2 3.5” TOUCH
Command Set
Vizic Technologies ©2014 137
2.12.2 Object Button 42hex ‘B’ ascii
Commands (host)
11 bytes + Text on Button + 1byte(NULL)
1.- 0x4F (hex), O (ascii). *OBJECT command.
2.- 0x42((hex), B (ascii).
3.- X1 coord high byte.
4.- X1 coord low byte.
5.- Y1 coord high byte.
6.- Y1 coord low byte.
7.- X2 coord high byte.
8.- X2 coord low byte.
9.- Y2 coord high byte.
10.- Y2 coord low byte.
11.- Active State (selected/un-selected).
12 N.- Button Text
N+1.- 0x00(hex) NULL character.
Responses (device)
1 byte
1.- 0x4F (hex), O (ascii) success ACK or
0x46 (hex), F (ascii) fail NAK.
Description
This Command generates-draws a
Selected/Unselected button object with the received
X1(16bit), Y1(16bit), X2(16bit), Y2(16bit)
coordinates, the Button text will be automatically
centered and font is adjusted in size to fit the Button,
if the Button is too Small to hold a large text inside it,
this will be discarded. Buttons without text can also
be created by passing only the 0x00(hex) NULL
Character as “Text on Button” parameter.
*Minimum Button Size accepted parameters are
20(dec)x20(dec), that means that the smallest
Button that can be created is 20x20 pixels.
(X2-X1) >= 20 and (Y2-Y1) >= 20.
Example (sent commands)
Example 1:
<4F,42,00,0A,00,14,00,C8,00,64,01,54,65,78,74,00>
Draw a Selected(0x01) button with the coordinates:
X1:10(dec), Y1:20(dec), X2:200(dec), Y2:100(dec),
and the word “Text” inside.