Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove coupling between AP_RCProtocols SRXL2 and DSM #23253

Merged

Conversation

peterbarker
Copy link
Contributor

Having the DSM backend calling into the SRXL2 backend isn't nice, so this fixes that.

Two commits, one changing namespaces the other moving the code into the correct files.

Board              AP_Periph  blimp  bootloader  copter  heli  iofirmware  plane  rover  sub
Durandal                      0      *           0       0                 0      0      0
Hitec-Airspeed     *                                                                     
KakuteH7-bdshot               0      *           0       0                 0      0      0
MatekF405                     0      *           0       0                 0      0      0
Pixhawk1-1M                   0      *           0       0                 0      0      0
f103-QiotekPeriph  *                                                                     
f303-Universal     *                                                                     
iomcu                                                          *                         
revo-mini                     0      *           0       0                 0      0      0
skyviper-v2450                                   *                                       

@peterbarker peterbarker force-pushed the pr/move-configure_vtx-to-rc-backend branch 2 times, most recently from aa7535b to 5f47d96 Compare March 19, 2023 05:48
@peterbarker peterbarker force-pushed the pr/move-configure_vtx-to-rc-backend branch 2 times, most recently from b0f1d80 to 2309713 Compare March 19, 2023 06:35
Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure the define inclusion is correct

@@ -21,6 +21,14 @@
#include <AP_Vehicle/AP_Vehicle_Type.h>
#include <AP_Logger/AP_Logger.h>

// for video TX configuration:
#if AP_VIDEOTX_ENABLED
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can do this can you because the define is inside the video tx header

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can get away with it because the header is transitively included via AP_RCProtocol.h

I've added an explicit include in this file.

.... that transitive include is a work of evil - the include at the end of AP_RCProtocol.h....

Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me, would just like to verify that nothing is broken as this is a code path that doesn't get a lot of use

@peterbarker
Copy link
Contributor Author

Change looks good to me, would just like to verify that nothing is broken as this is a code path that doesn't get a lot of use

I'm happy to buy some hardware to test with if you can point me at it.

I'd rather not have to wait for that hardware to arrive, however :-)

@andyp1per
Copy link
Collaborator

I can test - give me a few days

@peterbarker peterbarker force-pushed the pr/move-configure_vtx-to-rc-backend branch from fb48043 to a52e0f9 Compare March 21, 2023 02:52
this is called as a static method from DSM to SRXL2 which isn't good.
NFC, just moving from one cpp to another
@peterbarker peterbarker force-pushed the pr/move-configure_vtx-to-rc-backend branch from a52e0f9 to bb95033 Compare April 15, 2023 04:51
@peterbarker
Copy link
Contributor Author

I can test - give me a few days

So I did that :-)

Any luck?

@peterbarker
Copy link
Contributor Author

Ping @andyp1per

Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Urg, I have realized I can't test this as I sold my more modern Spektrum TX and the older DX8 I have does not support VTX updates. So better just go in.

@peterbarker
Copy link
Contributor Author

Thanks @andyp1per . Can you describe what hardware could be used to test this sort of thing?

@peterbarker peterbarker merged commit 75a0c59 into ArduPilot:master Apr 20, 2023
@peterbarker peterbarker deleted the pr/move-configure_vtx-to-rc-backend branch April 21, 2023 00:19
@andyp1per
Copy link
Collaborator

It needs a modern Spektrum TX. Since I basically maintain the Spektrum code I should probably put a proposal forward to the committee for one. I have DX8 - an up-to-date DX8 would be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants