SmartGPU2-LCD480X320Touch-CommandSet

SMART GPU 2 3.5” TOUCH
Command Set
Vizic Technologies ©2014 145
2.12.6 Object Slider 4Chex L’ ascii
Commands (host)
13 bytes
1.- 0x4F (hex), O (ascii). *OBJECT command.
2.- 0x4C((hex), L (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.- Slider Position (must be < Divisions).
12.- Divisions.
13.- Orientation: 0x00-Horizontal or
0x01-Vertical.
Responses (device)
1 byte
1.- 0x4F (hex), O (ascii) success ACK or
0x46 (hex), F (ascii) fail NAK.
Description
This Command generates-draws a Slider object
with the received X1(16bit), Y1(16bit), X2(16bit),
Y2(16bit) coordinates, the “Divisions” will be
automatically draw in the Slider area, if the Slider
area is too small to fit all the Divisions, those will
be discarded and not drawn, the Slider Position”
determines where to draw the Slider, finally the
Slider Bar can be Vertical or Horizontal.
This is a simple but useful object to create GUIs
that need Sliders.
*Minimum Slider Size accepted parameters are
25(dec)x25(dec), that means that the smallest
Slider Object that can be created is 25x25 pixels.
(X2-X1) >= 25 and (Y2-Y1) >= 25, Slider Position
must be always less than Divisions, Slider Position
< Divisions.
Example (sent commands)
Example 1:
<4F,4C,00,0A,00,0A,00,A0,00,40,04,0A,00> Draw
a Horizontal(0x00), Slider object with the
coordinates: X1:10(dec), Y1:10(dec), X2:160(dec),
Y2:64(dec), Slider Position:4(dec),
Divisions:10(dec).