ardupilot
ardupilot copied to clipboard
AP_PiccoloCAN: Remove duplicated code
Binary Name Text [B] Data [B] BSS (B) Total Flash Change [B] (%) Flash Free After PR (B)
--------------- -------------- ----------- ------------- ---------------------------- -------------------------
ardurover 68 (+0.0042%) 0 (0.0000%) 4 (+0.0015%) 68 (+0.0042%) 336444
blimp 68 (+0.0051%) 0 (0.0000%) -4 (-0.0015%) 68 (+0.0051%) 620888
arducopter 80 (+0.0045%) 0 (0.0000%) 0 (0.0000%) 80 (+0.0045%) 192244
arduplane 368 (+0.0209%) 0 (0.0000%) 0 (0.0000%) 368 (+0.0208%) 200064
ardusub 52 (+0.0033%) 0 (0.0000%) -4 (-0.0015%) 52 (+0.0033%) 397832
antennatracker 48 (+0.0036%) 0 (0.0000%) 0 (0.0000%) 48 (+0.0036%) 643764
arducopter-heli 68 (+0.0038%) 0 (0.0000%) -4 (-0.0015%) 68 (+0.0038%) 186060
This one is conflicting badly now, but still seems to be relevant - the duplicate code is still present in PiccoloCAN. We've had some recent activity in that directory - maybe we can drum up some interest.
@SchrodingersGat - this PR removes some code from PiccoloCAN by leveraging the ESC Telemetry library, and there's a few advantages in doing that - chiefly "less code is good code"
@peterbarker do you refer to removing the send_esc_telemetry_mavlink function? It appears it is not being used anywhere. I'm happy to submit a PR which removes that function. Anything else which needs clean-up?
Rebased, please review again.
What's with all the ! and <! stuff?
Half the code had Doxygen comments, half did not. Now all code has doxygen comments.
@SchrodingersGat can you take it from here?
@SchrodingersGat is this going to bitrot again?
@amilcarlucas I'll check it out
This will probably conflict with https://github.com/ArduPilot/ardupilot/pull/26252 so you better do it before that one gets merged.
@amilcarlucas we have reviewed and tested locally (after fixing compiling issues). With the changes suggested by @reilly-callaway above, we would be happy with this.
Please approve so that this can get merged once the tests pass.
@peterbarker are you OK with the current changes?
Can someone re-trigger the failing sub test?
Merged, thanks!
@amilcarlucas thanks for the work on this