Rev 7 | Rev 15 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 7 | Rev 14 | ||
|---|---|---|---|
| Line 6... | Line 6... | ||
| 6 | public: |
6 | public: |
| 7 | /// \param display the parent display |
7 | /// \param display the parent display |
| 8 | /// \param x x pos |
8 | /// \param x x pos |
| 9 | /// \param y y pos |
9 | /// \param y y pos |
| 10 | /// \param siz = size |
10 | /// \param siz = size |
| - | 11 | /// \param angle Angle from straight up for lowest (-angle) and highest (angle) reading |
|
| 11 | displayDial_t(display_t & display, |
12 | displayDial_t(display_t &display, |
| 12 | uint8_t x, |
13 | uint8_t x, |
| 13 | uint8_t y, |
14 | uint8_t y, |
| 14 | uint8_t siz, |
15 | uint8_t siz, |
| 15 | uint16_t angle = 90); |
16 | uint16_t angle = 90); |
| 16 | 17 | ||
| - | 18 | /// @brief Construct a display with angle from Angle high to angle low |
|
| - | 19 | /// @param display |
|
| - | 20 | /// @param x |
|
| - | 21 | /// @param y |
|
| - | 22 | /// @param siz |
|
| - | 23 | /// @param angle_high Angle relative to straight up for highest reading |
|
| - | 24 | /// @param angle_low Angle relative to straight up for lowest reading |
|
| 17 | // put the dial needle on the display |
25 | displayDial_t(display_t &display, |
| - | 26 | uint8_t x, |
|
| - | 27 | uint8_t y, |
|
| - | 28 | uint8_t siz, |
|
| - | 29 | int16_t angle_low, |
|
| 18 | void draw_needle (int16_t position); |
30 | int16_t angle_high); |
| 19 | 31 | ||
| 20 | // draw the scale |
- | |
| 21 | /// \param low low end of range |
- | |
| 22 | /// \param high high end of range |
- | |
| 23 | /// \param width length of long marker |
32 | // put the dial needle on the display |
| 24 | /// \param num_step number of ticks |
33 | void draw_needle(int16_t position); |
| 25 | /// \param scale |
- | |
| 26 | void draw_scale (int16_t low, int16_t high, uint8_t width, uint8_t num_step,int16_t scale); |
- | |
| 27 | 34 | ||
| - | 35 | // draw the scale |
|
| - | 36 | /// \param low low end of range |
|
| - | 37 | /// \param high high end of range |
|
| - | 38 | /// \param width length of long marker |
|
| 28 | /// print min/max limits |
39 | /// \param num_step number of ticks |
| 29 | void draw_limits(); |
40 | /// \param scale |
| - | 41 | void draw_scale(int16_t low, int16_t high, uint8_t width, uint8_t num_step, int16_t scale); |
|
| 30 | 42 | ||
| 31 | private: |
- | |
| 32 | display_t & m_display; |
- | |
| 33 | uint8_t const m_xo ; |
- | |
| 34 | uint8_t const m_yo ; |
- | |
| 35 | uint8_t const m_siz; |
43 | /// print min/max limits |
| 36 | uint16_t const m_a1; |
44 | void draw_limits(); |
| 37 | int16_t m_low; ///< lower scale limit |
- | |
| 38 | int16_t m_high; ///< upper scale limit |
- | |
| 39 | 45 | ||
| - | 46 | private: |
|
| - | 47 | display_t &m_display; |
|
| - | 48 | uint8_t const m_xo; ///< Position of origin |
|
| - | 49 | uint8_t const m_yo; ///< Position of origin |
|
| - | 50 | uint8_t const m_siz; ///< Display size |
|
| - | 51 | int16_t const m_angleLow; ///< Angle for lowest value |
|
| - | 52 | int16_t const m_angleRange; ///< Angle range from lowest to highest value |
|
| - | 53 | int16_t m_low; ///< lower scale limit |
|
| - | 54 | int16_t m_high; ///< upper scale limit |
|
| 40 | }; |
55 | }; |