Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
DigitLed.h@1:a74e42cf52b2, 2015-04-05 (annotated)
- Committer:
- adelino
- Date:
- Sun Apr 05 13:54:48 2015 +0000
- Revision:
- 1:a74e42cf52b2
PicasoLib version 2
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| adelino | 1:a74e42cf52b2 | 1 | #ifndef DIGIT_LED_H |
| adelino | 1:a74e42cf52b2 | 2 | #define DIGIT_LED_H |
| adelino | 1:a74e42cf52b2 | 3 | |
| adelino | 1:a74e42cf52b2 | 4 | #include "Screen.h" |
| adelino | 1:a74e42cf52b2 | 5 | |
| adelino | 1:a74e42cf52b2 | 6 | class DigitLed:public Widget |
| adelino | 1:a74e42cf52b2 | 7 | { |
| adelino | 1:a74e42cf52b2 | 8 | public: |
| adelino | 1:a74e42cf52b2 | 9 | /** Construct a Digit Led |
| adelino | 1:a74e42cf52b2 | 10 | * |
| adelino | 1:a74e42cf52b2 | 11 | * @param mScreen the pointer screen |
| adelino | 1:a74e42cf52b2 | 12 | * @params _x up left |
| adelino | 1:a74e42cf52b2 | 13 | * @params _y up left |
| adelino | 1:a74e42cf52b2 | 14 | * @params _ptVisible |
| adelino | 1:a74e42cf52b2 | 15 | */ |
| adelino | 1:a74e42cf52b2 | 16 | DigitLed(Screen* mScreen,UINT16 _x,UINT16 _y,bool _ptVisible); |
| adelino | 1:a74e42cf52b2 | 17 | // |
| adelino | 1:a74e42cf52b2 | 18 | virtual void draw(void); |
| adelino | 1:a74e42cf52b2 | 19 | // |
| adelino | 1:a74e42cf52b2 | 20 | virtual ~DigitLed(void); |
| adelino | 1:a74e42cf52b2 | 21 | // |
| adelino | 1:a74e42cf52b2 | 22 | void setInvisible(bool _state); |
| adelino | 1:a74e42cf52b2 | 23 | // |
| adelino | 1:a74e42cf52b2 | 24 | void setValue(char _value); |
| adelino | 1:a74e42cf52b2 | 25 | // |
| adelino | 1:a74e42cf52b2 | 26 | void setColorBkg(Color _colorBkg); |
| adelino | 1:a74e42cf52b2 | 27 | // |
| adelino | 1:a74e42cf52b2 | 28 | void setColorSeg(Color _colorSeg); |
| adelino | 1:a74e42cf52b2 | 29 | // |
| adelino | 1:a74e42cf52b2 | 30 | void setPtVisible(bool _state); |
| adelino | 1:a74e42cf52b2 | 31 | |
| adelino | 1:a74e42cf52b2 | 32 | protected: |
| adelino | 1:a74e42cf52b2 | 33 | char myValue; |
| adelino | 1:a74e42cf52b2 | 34 | Color myColorBkg; |
| adelino | 1:a74e42cf52b2 | 35 | Color myColorSeg; |
| adelino | 1:a74e42cf52b2 | 36 | UINT16 myIncX; |
| adelino | 1:a74e42cf52b2 | 37 | UINT16 myIncY; |
| adelino | 1:a74e42cf52b2 | 38 | bool isPtVisible; |
| adelino | 1:a74e42cf52b2 | 39 | // |
| adelino | 1:a74e42cf52b2 | 40 | void draw_seg_a(PicasoSerial* ps); |
| adelino | 1:a74e42cf52b2 | 41 | void draw_seg_b(PicasoSerial* ps); |
| adelino | 1:a74e42cf52b2 | 42 | |
| adelino | 1:a74e42cf52b2 | 43 | void draw_seg_c(PicasoSerial* ps); |
| adelino | 1:a74e42cf52b2 | 44 | |
| adelino | 1:a74e42cf52b2 | 45 | void draw_seg_d(PicasoSerial* ps); |
| adelino | 1:a74e42cf52b2 | 46 | void draw_seg_e(PicasoSerial* ps); |
| adelino | 1:a74e42cf52b2 | 47 | void draw_seg_f(PicasoSerial* ps); |
| adelino | 1:a74e42cf52b2 | 48 | |
| adelino | 1:a74e42cf52b2 | 49 | void draw_seg_g(PicasoSerial* ps); |
| adelino | 1:a74e42cf52b2 | 50 | void draw_seg_pt(PicasoSerial* ps); |
| adelino | 1:a74e42cf52b2 | 51 | }; |
| adelino | 1:a74e42cf52b2 | 52 | |
| adelino | 1:a74e42cf52b2 | 53 | #endif |