USSTRocketry / MiniRockets

Making rockets that hopefully go UP!
MIT License
2 stars 11 forks source link

radio code #60

Closed snowy-shadow closed 1 year ago

snowy-shadow commented 1 year ago

RHGenericDriver.cpp:(.text._ZN15RHGenericDriver7waitCADEv+0x0): multiple definition of `RHGenericDriver::waitCAD()' .pio/build/teensy41/lib948/libRadioHead.a(RHGenericDriver.cpp.o):RHGenericDriver.cpp:(.text._ZN15RHGenericDriver7waitCADEv+0x0): first defined here .pio/build/teensy41/lib61b/libRadioHead.a(RHGenericDriver.cpp.o): In function `RHGenericDriver::RHGenericDriver()': RHGenericDriver.cpp:(.text._ZN15RHGenericDriverC2Ev+0x0): multiple definition of `RHGenericDriver::RHGenericDriver()' .pio/build/teensy41/lib948/libRadioHead.a(RHGenericDriver.cpp.o):RHGenericDriver.cpp:(.text._ZN15RHGenericDriverC2Ev+0x0): first defined here .pio/build/teensy41/lib61b/libRadioHead.a(RHGenericDriver.cpp.o): In function `RHGenericDriver::RHGenericDriver()': RHGenericDriver.cpp:(.text._ZN15RHGenericDriverC2Ev+0x0): multiple definition of `RHGenericDriver::RHGenericDriver()' .pio/build/teensy41/lib948/libRadioHead.a(RHGenericDriver.cpp.o):RHGenericDriver.cpp:(.text._ZN15RHGenericDriverC2Ev+0x0): first defined here .pio/build/teensy41/lib61b/libRadioHead.a(RHGenericDriver.cpp.o): In function `RHGenericDriver::printBuffer(char const*, unsigned char const*, unsigned char)': RHGenericDriver.cpp:(.text._ZN15RHGenericDriver11printBufferEPKcPKhh+0x0): multiple definition of `RHGenericDriver::printBuffer(char const*, unsigned char const*, unsigned char)' .pio/build/teensy41/lib948/libRadioHead.a(RHGenericDriver.cpp.o):RHGenericDriver.cpp:(.text._ZN15RHGenericDriver11printBufferEPKcPKhh+0x0): first defined here .pio/build/teensy41/lib61b/libRadioHead.a(RHGenericDriver.cpp.o): In function `RHGenericDriver::setCADTimeout(unsigned long)': RHGenericDriver.cpp:(.text._ZN15RHGenericDriver13setCADTimeoutEm+0x0): multiple definition of `RHGenericDriver::setCADTimeout(unsigned long)' .pio/build/teensy41/lib948/libRadioHead.a(RHGenericDriver.cpp.o):RHGenericDriver.cpp:(.text._ZN15RHGenericDriver13setCADTimeoutEm+0x0): first defined here .pio/build/teensy41/lib61b/libRadioHead.a(RHGenericDriver.cpp.o):(.rodata._ZTV15RHGenericDriver+0x0): multiple definition of `vtable for RHGenericDriver' .pio/build/teensy41/lib948/libRadioHead.a(RHGenericDriver.cpp.o):(.rodata._ZTV15RHGenericDriver+0x0): first defined here collect2: error: ld returned 1 exit status *** [.pio/build/teensy41/firmware.elf] Error 1 ========================= [FAILED] Took 40.55 seconds ========================= Error: Process completed with exit code 1. compiling the library code failed... Shouldn't be an issue for us

snowy-shadow commented 1 year ago

did you turn on Werror for the git action?

frroossst commented 1 year ago

Yes, but warnings don't result in an error, you seem to have a linker error, does it build on local?

Edit: it's a linker error for multiple definitions from what it looks like in the radio library, you modify something there?

frroossst commented 1 year ago

Definitely looks like a code error because disabling all compiler optimisations still throws the linker error

Edit: I checked out your PR and tried changing the library and what not but nothing helps, I think something horrible has gone wrong here.

snowy-shadow commented 1 year ago

I couldn't build the CPP_FLIGHT code on my end for some reason, so I just copied over the code from RX and assumed it works

snowy-shadow commented 1 year ago

the radiohead/src/ folder breaks the code, removing that folder and just having the lib files in radiohead/ fixes the compilation error

snowy-shadow commented 1 year ago

also it would be nice if you could ignore all the lib files https://stackoverflow.com/questions/6321839/how-to-disable-warnings-for-particular-include-files

frroossst commented 1 year ago

Oh yeah, anything in lib has loads of #pragma directives to suppress warnings, in the future we should "fix" the warnings and open up a PR on the actual library's source code so that they're fixed for everyone, but for one we just suppress them. This compiles so I'm gonna merge this in now, we'll do more testing on Saturday.

Also, thank you for working on the radio code.