thomasfredericks / MicroOsc

MicroOsc is a minimal Open Sound Control (OSC) library for Arduino
MIT License
16 stars 2 forks source link

does not work on Teensy 3.2/3.5/4.1 #8

Closed zarpli closed 5 months ago

zarpli commented 5 months ago

hi,

the library works excellent on ESP32, uno, mega, but not on teensy boards.

I tried using teensy since some cards have 6 hardware serial ports, but the build throws a lot of warnings and finally it doesn't work.

Is there hope of supporting these cards?

best.

thomasfredericks commented 5 months ago

What error messages are you getting?

zarpli commented 5 months ago

compiling "MicroOsc_Demo_SLIP" returns:

In file included from /tmp/.arduinoIDE-unsaved202413-2546-px17m1.z0ta/microosc_slip_led-pot-photo-but_nano/microosc_slip_led-pot-photo-but_nano.ino:36: /home/science/Arduino/libraries/MicroOsc/src/MicroOscSlip.h: In instantiation of 'MicroOscSlip<MICRO_OSC_IN_SIZE>::MicroOscSlip(Stream*) [with unsigned int MICRO_OSC_IN_SIZE = 64]': /tmp/.arduinoIDE-unsaved202413-2546-px17m1.z0ta/microosc_slip_led-pot-photo-but_nano/microosc_slip_led-pot-photo-but_nano.ino:41:36: required from here /home/science/Arduino/libraries/MicroOsc/src/MicroOscSlip.h:140:15: warning: 'MicroOscSlip<64>::slip' will be initialized after [-Wreorder] 140 | MicroSlip slip; | ^~~~ /home/science/Arduino/libraries/MicroOsc/src/MicroOscSlip.h:152:65: warning: base 'MicroOsc' [-Wreorder] 152 | MicroOscSlip(Stream * stream) : slip(stream), MicroOsc(&slip) { | ^ /home/science/Arduino/libraries/MicroOsc/src/MicroOscSlip.h:152:5: warning: when initialized here [-Wreorder] 152 | MicroOscSlip(Stream * stream) : slip(stream), MicroOsc(&slip) { | ^~~~~~~~~~~~ /home/science/Arduino/libraries/MicroOsc/src/MicroOsc.cpp: In member function 'bool MicroOsc::getNextMessage()': /home/science/Arduino/libraries/MicroOsc/src/MicroOsc.cpp:295:39: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'unsigned int'} [-Wsign-compare] 295 | if ((bundle.marker - bundle.buffer) >= bundle.bundleLen) return false; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ /home/science/Arduino/libraries/MicroOsc/src/MicroOsc.cpp: In member function 'float MicroOscMessage::nextAsFloat()': /home/science/Arduino/libraries/MicroOsc/src/MicroOsc.cpp:391:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 391 | return *((float *) (&i)); // HARD CAST TO FLOAT

zarpli commented 5 months ago

sorry I was wrong.

Despite the warnings, the library does work :)

thomasfredericks commented 5 months ago

In the next release the warning messages will be solved. They are annoying.