Continued work
This commit is contained in:
@@ -3,26 +3,31 @@
|
||||
|
||||
/**** Includes ****/
|
||||
#include <stdint.h>
|
||||
#include "../bsp/ain.h"
|
||||
#include "../bsp/board.h"
|
||||
|
||||
namespace hw {
|
||||
|
||||
/**** Public definitions ****/
|
||||
|
||||
class Potentiometer
|
||||
{
|
||||
protected:
|
||||
bsp::AnalogIn* ain_ch;
|
||||
|
||||
{
|
||||
public:
|
||||
Potentiometer(bsp::AnalogIn* ain_ch, uint16_t low_deadzone, uint16_t high_deadzone);
|
||||
Potentiometer(void);
|
||||
~Potentiometer(void);
|
||||
|
||||
void init(bsp::AnalogIn* ain_ch, uint16_t low_deadzone, uint16_t high_deadzone);
|
||||
|
||||
uint16_t low_deadzone;
|
||||
uint16_t high_deadzone;
|
||||
uint8_t percent;
|
||||
uint8_t last_percent;
|
||||
uint8_t update_ain;
|
||||
|
||||
uint8_t update(void);
|
||||
uint8_t read(void);
|
||||
|
||||
#ifndef TESTING
|
||||
protected:
|
||||
#endif
|
||||
bsp::AnalogIn* ain_ch;
|
||||
};
|
||||
|
||||
/**** Public function declarations ****/
|
||||
|
||||
Reference in New Issue
Block a user