Rev 4 | Rev 7 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4 | mjames | 1 | #pragma once |
5 | mjames | 2 | #include <cstdint> |
4 | mjames | 3 | |
4 | class displayDial_t |
||
5 | { |
||
6 | public: |
||
5 | mjames | 7 | /// \param display the parent display |
8 | /// \param x x pos |
||
9 | /// \param y y pos |
||
10 | /// \param siz = size |
||
11 | displayDial_t(display_t & display, |
||
12 | uint8_t x, |
||
13 | uint8_t y, |
||
14 | uint8_t siz, |
||
15 | uint16_t angle = 90); |
||
4 | mjames | 16 | |
5 | mjames | 17 | // put the dial needle on the display |
18 | void draw_needle (int16_t position); |
||
4 | mjames | 19 | |
5 | mjames | 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 |
||
24 | /// \param num_step number of ticks |
||
25 | /// |
||
26 | void draw_scale (int16_t low, int16_t high, uint8_t width, uint8_t num_step,int16_t scale); |
||
4 | mjames | 27 | |
28 | |||
29 | |||
30 | private: |
||
5 | mjames | 31 | display_t & m_display; |
4 | mjames | 32 | uint8_t const m_xo ; |
33 | uint8_t const m_yo ; |
||
34 | uint8_t const m_siz; |
||
35 | uint16_t const m_a1; |
||
36 | |||
37 | }; |