JumperXYZ / JumperTX

70 stars 38 forks source link

Can't build JumperTX for the T12 since PR #9 #11

Closed benlye closed 5 years ago

benlye commented 5 years ago

Since PR #9 was merged to add support for the T16's internal module, JumperTX no longer builds for the T12.

Attempting to configure the firmware gives this result when cmake is called:

/tmp/jumpertx/radio/src/pulses/multi_arm.cpp: In function 'void sendMulti(uint8_t, uint8_t)':
/tmp/jumpertx/radio/src/pulses/multi_arm.cpp:40:29: error: 'union ModulePulsesData' has no member named 'pxx_uart'
/tmp/jumpertx/radio/src/pulses/multi_arm.cpp: In function 'void setupPulsesMultimodule(uint8_t)':
/tmp/jumpertx/radio/src/pulses/multi_arm.cpp:101:28: error: 'union ModulePulsesData' has no member named 'pxx_uart'
/tmp/jumpertx/radio/src/pulses/multi_arm.cpp:101:66: error: 'union ModulePulsesData' has no member named 'pxx_uart'
radio/src/CMakeFiles/firmware.dir/build.make:518: recipe for target 'radio/src/CMakeFiles/firmware.dir/pulses/multi_arm.cpp.o' failed
make[3]: *** [radio/src/CMakeFiles/firmware.dir/pulses/multi_arm.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:111: recipe for target 'radio/src/CMakeFiles/firmware.dir/all' failed
make[2]: *** [radio/src/CMakeFiles/firmware.dir/all] Error 2
CMakeFiles/Makefile2:123: recipe for target 'radio/src/CMakeFiles/firmware.dir/rule' failed
make[1]: *** [radio/src/CMakeFiles/firmware.dir/rule] Error 2
Makefile:118: recipe for target 'firmware' failed
make: *** [firmware] Error 2

Full compile output is here: https://pastebin.com/raw/0KaHyesq

Prior to the changes in PR #9 the same CMAKE command succeeded for the T12.

renebohne commented 5 years ago

one way to fix it might be to add

#if defined(INTMODULE_USART) || defined(EXTMODULE_USART)
...
#endif 

around the lines (40 and 101) in multi_arm.cpp, right? At least it will compile then. But why was the pxx_uart removed for the t12 instead of handling the situation inside of the union ModulePulsesData in pulses_arm.h ?

renebohne commented 5 years ago

I tested my idea and it compiles. Uploaded it to my T12 and everything seems to work fine. Pull Request #15 : https://github.com/JumperXYZ/JumperTX/pull/15

benlye commented 5 years ago

Cool, I'll try it out on my T16 and make sure that the internal and external modules still work as expected.

Presumably you are using a multi-protocol module with telemetry in your T12?

benlye commented 5 years ago

Tried it out - my T16 works fine with both internal and external multiprotocol modules - I get telemetry from the module (version number) and RSSI from the model.

renebohne commented 5 years ago

Yes, I am using the external jumper 4in1 multiprotocol that was shipped with the t12. I flashed it with the latest multiprotocol Firmware from github. It is amazing: all e010 toy tiny whoops that never worked with the t12 are now working perfectly :)