-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Passing parameters to px4io #519
Comments
You can use param set PARAM_NAME and then have the PX4IO driver obey that VBAT_SCALE value. Currently BAT_V_SCALING is used for FMU, but you might be able to reconcile them by rebasing the FMU ADC scale onto the same nominal voltage as IO and then apply the same factor on both. |
Thanks for the response. No luck, though, just using the param set command. Specifically, I added the following to my rc script:
but it still reflects the default value of 10000 |
I just went ahead and did it for you: add:
In your startup script and use this branch #557 for testing - its untested! But it should work. |
Perfect! It works great. I will study what you did - hopefully one day I will be competent enough to do this kind of stuff myself. |
Thanks for the feedback, glad it helped - closing this issue now. |
Is there a mechanism to pass a parameter to the px4io through the rc script? Specifically, I want to configure the PX4IO_P_SETUP_VBATT_SCALE to work with this mod
https://pixhawk.ethz.ch/px4/airframes/mantis_x8_6ssetup
without having to carry local changes forever.
volatile uint16_t r_page_setup[] =
{
[PX4IO_P_SETUP_FEATURES] = 0,
[PX4IO_P_SETUP_ARMING] = 0,
[PX4IO_P_SETUP_PWM_RATES] = 0,
[PX4IO_P_SETUP_PWM_DEFAULTRATE] = 50,
[PX4IO_P_SETUP_PWM_ALTRATE] = 200,
ifdef CONFIG_ARCH_BOARD_PX4IO_V1
endif
ifdef ADC_VSERVO
else
endif
};
The text was updated successfully, but these errors were encountered: