Rev 5 | Rev 10 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 5 | Rev 7 | ||
|---|---|---|---|
| Line 55... | Line 55... | ||
| 55 | 55 | ||
| 56 | void displayDial_t::draw_scale ( int16_t low, int16_t high, uint8_t width, uint8_t num_step,int16_t scale) |
56 | void displayDial_t::draw_scale ( int16_t low, int16_t high, uint8_t width, uint8_t num_step,int16_t scale) |
| 57 | { |
57 | { |
| 58 | 58 | ||
| 59 | int ang; |
59 | int ang; |
| - | 60 | m_low = low; |
|
| - | 61 | m_high = high; |
|
| 60 | int sc_low = low/scale; |
62 | int sc_low = low/scale; |
| 61 | int sc_high = high/scale; |
63 | int sc_high = high/scale; |
| 62 | int step = 256 * m_a1 * 2 / (4 * (sc_high - sc_low)); |
64 | int step = 256 * m_a1 * 2 / (4 * (sc_high - sc_low)); |
| 63 | int t; |
65 | int t; |
| 64 | ang = -m_a1 * 256; |
66 | ang = -m_a1 * 256; |
| Line 89... | Line 91... | ||
| 89 | math.AP_SCALE((m_siz-len)*si) + m_xo, |
91 | math.AP_SCALE((m_siz-len)*si) + m_xo, |
| 90 | m_yo - math.AP_SCALE((m_siz - len) * co), WHITE); |
92 | m_yo - math.AP_SCALE((m_siz - len) * co), WHITE); |
| 91 | ang += step; |
93 | ang += step; |
| 92 | } |
94 | } |
| 93 | 95 | ||
| - | 96 | } |
|
| - | 97 | ||
| - | 98 | ||
| - | 99 | void displayDial_t::draw_limits() |
|
| - | 100 | { |
|
| 94 | // font_sig_digits (0,7,0,10,low); |
101 | m_display.fontSigDigits (small_font, 0,56,0,10,m_low,WHITE); |
| 95 | // font_sig_digits(20,7,1,10,high); |
102 | m_display.fontSigDigits (small_font, 120,56,1,10,m_high,WHITE); |
| 96 | } |
103 | } |