Balboa32U4 library
Balboa32U4Encoders.h
Go to the documentation of this file.
1 // Copyright Pololu Corporation. For more information, see http://www.pololu.com/
2 
5 #pragma once
6 
7 #include <stdint.h>
8 
32 {
33 
34 public:
35 
40  static void init()
41  {
42  static bool initialized = 0;
43  if (!initialized)
44  {
45  initialized = true;
46  init2();
47  }
48  }
49 
58  static int16_t getCountsLeft();
59 
62  static int16_t getCountsRight();
63 
67  static int16_t getCountsAndResetLeft();
68 
71  static int16_t getCountsAndResetRight();
72 
85  static bool checkErrorLeft();
86 
89  static bool checkErrorRight();
90 
91 private:
92 
93  static void init2();
94 };
static int16_t getCountsLeft()
static int16_t getCountsRight()
static int16_t getCountsAndResetRight()
static bool checkErrorRight()
static bool checkErrorLeft()
Reads counts from the encoders on the Balboa 32U4.
static int16_t getCountsAndResetLeft()