SmartGPU2-LCD480X320Touch-CommandSet

SMART GPU 2 3.5” TOUCH
Command Set
Vizic Technologies ©2014 143
2.12.5 Object Scroll Bar 53hex ‘S’ ascii
Commands (host)
14 bytes
1.- 0x4F (hex), O (ascii). *OBJECT command.
2.- 0x53((hex), S (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.- Bar Position (must be < Divisions).
12.- Divisions.
13.- Orientation: 0x00-Horizontal or
0x01-Vertical.
14.- Active State(selected/un-selected).
Responses (device)
1 byte
1.- 0x4F (hex), O (ascii) success ACK or
0x46 (hex), F (ascii) fail NAK.
Description
This Command generates-draws a Scroll Bar
object with the received X1(16bit), Y1(16bit),
X2(16bit), Y2(16bit) coordinates, the “Divisions”
parameter will determine actual Bar Size, the “Bar
Position” determines where to draw the Bar, the
Scroll Bar can be Vertical or Horizontal and
selected or un-selected.
This is a simple but useful object to create GUIs
that need Scroll Bars.
*Minimum Scroll Bar accepted parameters are
25(dec)x25(dec), that means that the smallest
Scroll Bar that can be created is 25x25 pixels.
(X2-X1) >= 25 and (Y2-Y1) >= 25, Bar Position
must be always less than Divisions, Bar Position <
Divisions, and it’s also recommended to set small
numbers to “Divisions” (<= 10).
Example (sent commands)
Example 1:
<4F,53,00,00,00,00,00,A0,00,70,04,0A,00,00>
Draw a Horizontal(0x00), Un-selected(0x00) Scroll
Bar object with the coordinates: X1:0(dec),
Y1:0(dec), X2:160(dec), Y2:112(dec), Bar
Position:4(dec), Divisions:10(dec).