MartinWaller
Registered: 03/01/12 Posts: 3
|
|
Posted 03/01/12
|
Reply with quote
#1
|
|
Hi, I'm looking at the documentation:
GOLDELOX-SGC Command Set Software Interface Specification Document Date: 17th November 2011 Document Revision: 6.0
and trying to get my uLCD-144 to draw a polygon. The documentation says:
Command cmd, vertices, x1, y1, .. , xn, yn, colour (msb:lsb)4DSL Cmd Polygon(vertices, x1, y1, .. , xn, yn, colour) cmd 67(hex) or g(ascii) : Command header bytevertices Number of vertices from 3 to 7. This byte specifies the number of vertices of the polygon. x1,y1,..xn, yn Vertices of the Polygon. These can be specified in any fashion. 1 Byte each. colour 2 bytes triangle colour value.
With the example command Data of:
67hex, 20hex, 05hex, 05hex, 20hex, 40hex, 28hex, 80hex, 10hex
I am failing to get this to work. Having said that the documentation above mentions the word Triangle! - "colour 2 bytes triangle colour value" and I'm pretty sure the example command data is for a triangle too!
Am I looking at a cut & paste error here? Is this part of the documentation correct?
Does anyone have any code that works for a polygon that they could possibly share?
Many thanks
Martin
|
|
Loading...
|
|
ESPsupport
Moderator
Registered: 27/01/09 Posts: 4,282
|
|
Posted 03/01/12
|
Reply with quote
#2
|
|
|
Ouch, that example can't work. You should use FAT Controller http://www.4dsystems.com.au/prod.php?id=70 for a more 'interactive' test. A FAT controller log for a more correct version of that command looks like this Draw Polygon 0.000 [67 04 20 05 05 20 40 28 80 10 F8 1F] <ACK> I.E., as per the manual, the second byte is the number of vertices and the last two bytes are the color. The word triangle when describing the color is wrong and whilst the example is the correct length for a triangle, the color is a bit 'odd'.
|
|
Loading...
|
|
MartinWaller
Registered: 03/01/12 Posts: 3
|
|
Posted 04/01/12
|
Reply with quote
#3
|
|
Sorted! Many thanks.
If anyone wants to try out the uLCD-144 C# NetDuino library that I have so far then please email me on martin [at] the-wallers.net
Many thanks
Martin
|
|
Loading...
|
|