
- RLL encode images:
  - 1 cntrl byte
    - bit 7=0: bits 0-6=number of normal bytes following
    - bit 7=1: bits 0-6=number of repeats, in this case the repeated byte follows

- encoding:
  - buffer
  - bytesInBuffer
  - loop
    - startOfRepetitionWithMoreThan2Bytes?
      - yes:
        - add buffer to result with preceeding CNTRL byte
        - reset buffer
        - add CNTRL for repetition
        - add repetition byte
      - no:
        - add current byte to buffer
        - buffer contains 127 bytes?
          - yes: 
            - add buffer to result with preceeding CNTRL byte
            - reset buffer


- new classes:
  - button
    - move touch code there
  - flashingLabel
    - use timer to blink/flash label, e.g. when values change
- widget:
  - font
    - use ressourceId instead of direct pointer
    - store font in ressources


- sensor watch:
  - SDRAM vars:
    - nodeAddr
    - variableId
    - currentValue
    - threshold yellow
    - threshold red
  - widgets:
    - title (label)
    - image (imageView)
    - value (flashingLabel)

  - routines:
    - setValue()

  - routines in app:
    - onMsgReceived:
      - filter-out reportValue
      - filter-out setValue msgs (to select sensors)



- imageViewer (use code from testWin)
- generate bigger images (96x96 px)
  - cloud (light blue)
  - temp
  - humidity
  - light
  - window_open
  - window_closed

  |--------------------------------------|
  |   CO2-Value    Temp       Humidity   |
  |  |--------|  |--------|  |--------|  |
  |  | Cloud  |  | Temp   |  | Hum    |  |
  |  |        |  |        |  |        |  |
  |  |--------|  |--------|  |--------|  |
  |                                      |
  |                              |---|   |
  |                              | S |   |
  |                              |---|   |
  |                                      |
  |--------------------------------------|



  |--------------------------------------|
  |   CO2-Value    Temp       Humidity   |
  |  |--------|  |--------|  |--------|  |
  |  | Cloud  |  | Temp   |  | Hum    |  |
  |  |        |  |        |  |        |  |
  |  |--------|  |--------|  |--------|  |
  |                                      |
  |  |---|  |---|  |---|  |---|  |---|   |
  |  | < |  | N |  | L |  | ? |  | > |   |
  |  |---|  |---|  |---|  |---|  |---|   |
  |                                      |
  |--------------------------------------|
  
Object:
- next
- parent
- firstChild
- options (2 bytes)
- signal handling
  - targetAddr   (like in FOX)
  - selector
  - handlerMap:
    - selector/signal (00: end), handlerAddr
Widgets:
- x          (2 bytes)
- y          (2 bytes)
- width      (2 bytes)
- height     (2 bytes)
- font       (2 bytes)
- frontColor (2 bytes)
- backColor  (2 bytes)

Labels:
- text


Signals:
- CREATE
- DESTROY
- SHOW
- HIDE
- DRAW
- TIMER
- TOUCH
[- KEY]
- USER  = 16



OBJ:
- SDRAM pointer hierher verschieben
- speichere dort:
  - FLAGS_LO, FLAGS_HI  (2 bytes)
  - NEXT, PARENT, CHILD (6 bytes)

- OBJ_AddNeighbour()
- OBJ_AddChild()
- OBJ_Unlink()
