-
-
Notifications
You must be signed in to change notification settings - Fork 93
Description
I've imported the base_controller project directory into VSCode+PIO. I added the Paul Stoffregen "Encoder" library but when I build I get the following syntax errors. I'd really appreciate a little guidance on what I did wrong and how to fix it. The issue seems to have something to do with namespace and scope, but exactly what? Thanks in advance for any help.
[platformio]
default_envs = teensy31
[env:teensy31]
platform = teensy
board = teensy31
framework = arduino
lib_deps =
frankjoshua/Rosserial Arduino Library@^0.9.1
./lib
adafruit/Adafruit Motor Shield V2 Library@^1.0.11
Wire
paulstoffregen/Encoder@^1.4.1
Building in release mode
Compiling .pio/build/teensy31/src/main.cpp.o
Compiling .pio/build/teensy31/lib821/SPI/SPI.cpp.o
Compiling .pio/build/teensy31/lib8c6/Ethernet/Dhcp.cpp.o
Compiling .pio/build/teensy31/lib8c6/Ethernet/Dns.cpp.o
In file included from .pio/libdeps/teensy31/lib/base_controller.h:17:0,
from src/main.cpp:4:
lib/encoder/encoder.h:39:11: error: 'Encoder' in namespace '::' does not name a type
::Encoder encoder;
^
lib/encoder/encoder.h: In member function 'int32_t diffbot::Encoder::read()':
lib/encoder/encoder.h:89:40: error: 'encoder' was not declared in this scope
inline int32_t read() { return encoder.read(); };
^
lib/encoder/encoder.h: In member function 'void diffbot::Encoder::write(int32_t)':
lib/encoder/encoder.h:97:40: error: 'encoder' was not declared in this scope
inline void write(int32_t p) { encoder.write(p); };
^