6#include <avr/interrupt.h>
28 Serial.println(
"initEncoders()");
41 attachInterrupt(4,
rightISR, CHANGE);
58 Serial.println(
"/initEncoders()");
67 int16_t tempCount =
count;
78 int16_t tempCount =
count;
92 int16_t currCount =
count;
static void setInputPulledUp() __attribute__((always_inline))
Sets a pin to be a digital input with the internal pull-up resistor enabled.
static bool isInputHigh() __attribute__((always_inline))
Reads the input value of the pin.
volatile CTRL_MODE ctrlMode
int16_t getAndResetCount(void)
void handleISR(bool newA, bool newB)
static void initEncoders()
void calcEncoderDelta(void)
volatile int16_t prevCount
virtual void setEffort(int16_t effort)=0
Sets the effort for the motor directly. Overloaded for the left and right motors. Use Chassis::setEff...
void attachPCInt(uint8_t pcInt, void(*pcisr)(void))
Attaches a function to a pin change interrupt.