Fokkaði upp p2
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef ROTARY_ENCODER_DRIVER_H
|
||||
#define ROTARY_ENCODER_DRIVER_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "digital_in.h"
|
||||
#include "digital_out.h"
|
||||
#include "timer_usec.h"
|
||||
@@ -9,6 +11,7 @@ class RotaryEncoderDriver {
|
||||
volatile uint8_t cycle;
|
||||
volatile int16_t count;
|
||||
volatile int16_t prev_count;
|
||||
volatile bool speed_ready;
|
||||
|
||||
Digital_out led;
|
||||
|
||||
@@ -28,5 +31,8 @@ public:
|
||||
float count_per_sec();
|
||||
float rpm();
|
||||
|
||||
bool new_speed_available();
|
||||
void reset_speed_measurement();
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user