Subversion Repositories libOLED

Rev

Rev 5 | Rev 15 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #pragma once
  2. #include <cstdint>
  3.  
  4. class displayDial_t
  5. {
  6. public:
  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);
  16.  
  17.    // put the dial needle on the display
  18.    void draw_needle (int16_t position);
  19.  
  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.    /// \param scale
  26.    void draw_scale (int16_t low, int16_t high, uint8_t width, uint8_t num_step,int16_t scale);
  27.  
  28.    /// print min/max limits
  29.    void draw_limits();
  30.  
  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;
  36.   uint16_t const m_a1;
  37.   int16_t  m_low;  ///< lower scale limit
  38.   int16_t  m_high; ///< upper scale limit
  39.  
  40.  };
  41.