Subversion Repositories libOLED

Rev

Rev 4 | Rev 7 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 5
Line 1... Line 1...
1
#pragma once
1
#pragma once
2
#include "ap_math.H"
2
#include <cstdint>
3
 
3
 
4
class displayDial_t
4
class displayDial_t
5
{
5
{
6
public:
6
public:
-
 
7
  /// \param display the parent display
-
 
8
  /// \param x x pos
-
 
9
  /// \param y y pos
-
 
10
  /// \param siz = size
7
   displayDial_t(uint8_t x, uint8_t y, uint8_t siz);
11
  displayDial_t(display_t & display,
-
 
12
                uint8_t x,
-
 
13
                uint8_t y,
-
 
14
                uint8_t siz,
-
 
15
                uint16_t angle = 90);
8
 
16
 
-
 
17
   // put the dial needle on the display
9
   void draw_needle (display_t & display, uint16_t position);
18
   void draw_needle (int16_t position);
10
 
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
   ///
11
   void draw_scale (display_t & display, int16_t low, int16_t high, uint8_t width, uint8_t num_step,int16_t scale);
26
   void draw_scale (int16_t low, int16_t high, uint8_t width, uint8_t num_step,int16_t scale);
12
 
27
 
13
 
28
 
14
 
29
 
15
private:
30
private:
-
 
31
  display_t & m_display;
16
  uint8_t const m_xo ;
32
  uint8_t const m_xo ;
17
  uint8_t const m_yo ;
33
  uint8_t const m_yo ;
18
  uint8_t const m_siz;
34
  uint8_t const m_siz;
19
  uint16_t const m_a1;
35
  uint16_t const m_a1;
20
 
36
 
21
 
-
 
22
 };
37
 };