Hello,
I just tried to use your Encoder library in Platformio (platform=atmelavr).
First, everything compiled well, but then I switched on ENCODER_OPTIMIZE_INTERRUPTS.
After that I got multiple definitions of __vector_1 and __vector_2 when linking all together.
I'm using Encoder.h in multiple CPP files, so the ISR(INTx_vect) are multiply compiled and the linker throws an error.
My quick solution was to move the last part of Encoder.h (that part which is outside the class definition) to Encoder.cpp. So this part is only compiled once and the linker succeeds.
Hello, I just tried to use your Encoder library in Platformio (platform=atmelavr). First, everything compiled well, but then I switched on ENCODER_OPTIMIZE_INTERRUPTS.
After that I got multiple definitions of __vector_1 and __vector_2 when linking all together.
I'm using Encoder.h in multiple CPP files, so the ISR(INTx_vect) are multiply compiled and the linker throws an error.
My quick solution was to move the last part of Encoder.h (that part which is outside the class definition) to Encoder.cpp. So this part is only compiled once and the linker succeeds.
Maybe there is another, better solution?
Kind regards, Martin