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

[Bug] Parameters not found in custom module #23162

Open
bmelanman opened this issue May 21, 2024 · 1 comment
Open

[Bug] Parameters not found in custom module #23162

bmelanman opened this issue May 21, 2024 · 1 comment

Comments

@bmelanman
Copy link
Contributor

Describe the bug

I've been doing semi-regular syncs between the main PX4 repo branch and a custom fork that I've been using to implement a gimbal as a senior project.

Unfortunately it seems that the most recent sync has (somehow?) broken my module's parameters! Once everything is compiled and flashed, the UART output of the ARK CANnode I'm using give a wall of ERROR [param] Parameter <whatever> not found. for all of my module's params.

I've had similar issues in the past (that is, errors related to a repo sync), and I can normally just sort through the commits to see what might've caused the issue, but I haven't been able to find anything thus far, and I'm making very little progress towards a solution compared to past issues as well.

To Reproduce

Clone my PX4 fork (LINK) and compile it for the ARK CANnode, flash it however you choose, and watch the debug UART output on boot

git clone https://github.com/bmelanman/PX4-Autopilot.git && cd PX4-Autopilot
make ark_cannode_default
st-flash write ./build/ark_cannode_default/83-*.bin 0x08010000
st-flash reset
screen /dev/tty.usbserial-D30CYNAP 57600

Expected behavior

I expect all parameters to be found

Screenshot / Media

No response

Flight Log

N/A

Software Version

nsh> ver all
HW arch: ARK_CANNODE
PX4 git-hash: 0f3f4566ac278b629691816f529f2294578ed2e5
PX4 version: 1.15.0 80 (17760384)
PX4 git-branch: main
OS: NuttX
OS version: Release 11.0.0 (184549631)
OS git-hash: 0f401a6062653795b6355c420ea8b0e72578c204
Build datetime: May 21 2024 15:59:42
Build uri: localhost
Build variant: default
Toolchain: GNU GCC, 10.3.1 20210824 (release)
PX4GUID: 0001000000002037374c33315008003e0038
MCU: STM32F???, rev. ?
nsh>

Flight controller

ARK CANnode

Vehicle type

Other

How are the different components wired up (including port information)

The CANnode is currently not connected to anything except 5V and a debug breakout board

Additional context

No response

@bmelanman
Copy link
Contributor Author

bmelanman commented May 22, 2024

Update on this: I figured it out! I had used a formatter on my parameters source file (i.e. module_params.c) which apparently prevented the params from being parsed due to the addition of spaces inside the param declaration

This works:

PARAM_DEFINE_INT32(MNT_DO_STAB, 0);
// without spaces ^              ^

This does not work:

PARAM_DEFINE_INT32( MNT_DO_STAB, 0 );
// with spaces     ^              ^

Technically the problem is now solved, however this seems like something that will come up as an issue again in the future, so feel free to leave this issue open, or close it and make a new one, or whatever else.

Thanks!

@github-actions github-actions bot added the stale label Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant