PRO Display

From meteobridge
Revision as of 15:18, 6 December 2015 by Admin (Talk | contribs) (Created page with "<languages /><translate> <br /> This page explains how to control the Meteobridge PRO display. ==Display Commands== Display commands are lined up in sequence, where each comm...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

<languages /><translate>
This page explains how to control the Meteobridge PRO display.

Display Commands

Display commands are lined up in sequence, where each command is terminated by a "\n" (quoted line feed). Commands are executed from left to right. Each Display command starts with a "#".

Control commands

The control flow when using the display is to

  1. Clear the previously used data structures and to prepare the display driver for a new screen.
  2. build the new screen with a set of drawing/writing commands in the background (framebuffer)
  3. when done show the content prepared in the background

This is done by these commands:

  • #new prepares the display frame buffer collect new content.
  • #show makes the content prepared in the framebuffer visible.

Inbetween these commands a lot of drawing commands can be used to design the screen. The screen has size 128 x 64. Origin is located in the upper left. Items are drawn upright at the given coordinates. The commands are mostly 1:1 mappings to the u8g drawing command list ([1] u8g command reference). With Meteobridge PRO you can use these commands:

  • #sblogo x y draws the smartbedded logo (shown when unit starts) at position x,y.
  • #clear sets complete screen area to background color.
  • #clearall does as #clear does but also clears active progress bars (if any).
  • #box x y w h draws a solid box at position x,y with width w and height h in foreground color.
  • #rbox x y w h r draws a rounded box with radius r at the corners
  • #circle x y r s draws a circle at x,y with radius r. s is optional parameter that can define which segment of the circle to draw: ur = upper right, ul = upper left, lr = lower right, ll = lower left
  • #disc x y r s draws a circle filled with foreground color, parameters are as with #circle.
  • #ellipse x y rx ry s draws an ellipse at position x,y with vertical radius ry and horizontal radius rx. s has same meaning as with #circle.
  • #filledellipse x y rx ry s draws an elllipse filled with foreground color, parameters are as with #ellipse.
  • #frame x y w h draws a rectangular frame. Meaning of parameters is as with #box.
  • #rframe x y w h r draws a rounded frame, r defined the radius of the corner.
  • #hline x y w draws a horizontal line beginning from position x,y with length w.
  • #vline x y h draws a vertical line beginning at position x,y with length h.
  • #line x1 y1 x2 y2 draws a straight line from position x1,y1 to position x2,y2.
  • #pixel x y sets pixel at position x,y to foreground color.
  • #string x y text prints text starting at position x,y.
  • #string90 x y text prints text starting at position x,y 90 degrees counter-clockwise oriented.
  • #string180 x y text prints text starting at position x,y 180 degrees counter-clockwise oriented.
  • #string270 x y text prints text starting at position x,y 270 degrees counter-clockwise oriented.
  • #triangle x1 y1 x2 y2 x3 y3 prints a triangle through positions x1,y1 and x2,y2 and x3,y3.
  • #color c sets color c as foreground color, c = 0 is black, c = 1 is white.
  • #font name defined font "name" to be used for string commands. List of available fonts can be found here


Most of the commands are direct equivalents to the u8g procedure calls.

</translate>