Subversion Repositories libOLED

Rev

Rev 5 | Rev 14 | 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
7 mjames 25
   /// \param scale
5 mjames 26
   void draw_scale (int16_t low, int16_t high, uint8_t width, uint8_t num_step,int16_t scale);
4 mjames 27
 
7 mjames 28
   /// print min/max limits
29
   void draw_limits();
4 mjames 30
 
31
private:
5 mjames 32
  display_t & m_display;
4 mjames 33
  uint8_t const m_xo ;
34
  uint8_t const m_yo ;
35
  uint8_t const m_siz;
36
  uint16_t const m_a1;
7 mjames 37
  int16_t  m_low;  ///< lower scale limit
38
  int16_t  m_high; ///< upper scale limit
4 mjames 39
 
40
 };