Replaced #if defined with #ifdef statements in encoder_driver.ino

This commit is contained in:
Patrick Goebel 2015-12-06 21:36:15 -08:00
parent b1b6caf47c
commit 1a560fa508

View File

@ -1,7 +1,7 @@
/* ************************************************************* /* *************************************************************
Encoder definitions Encoder definitions
Add a "#if defined" block to this file to include support for Add an "#ifdef" block to this file to include support for
a particular encoder board or library. Then add the appropriate a particular encoder board or library. Then add the appropriate
#define near the top of the main ROSArduinoBridge.ino file. #define near the top of the main ROSArduinoBridge.ino file.
@ -27,7 +27,7 @@
if (i == LEFT) return encoders.YAxisReset(); if (i == LEFT) return encoders.YAxisReset();
else return encoders.XAxisReset(); else return encoders.XAxisReset();
} }
#elif defined ARDUINO_ENC_COUNTER #elif ARDUINO_ENC_COUNTER
volatile long left_enc_pos = 0L; volatile long left_enc_pos = 0L;
volatile long right_enc_pos = 0L; volatile long right_enc_pos = 0L;
static const int8_t ENC_STATES [] = {0,1,-1,0,-1,0,0,1,1,0,0,-1,0,-1,1,0}; //encoder lookup table static const int8_t ENC_STATES [] = {0,1,-1,0,-1,0,0,1,1,0,0,-1,0,-1,1,0}; //encoder lookup table