Parameter setting from cfclient not working

Discussions about all things Bitcraze
Post Reply
marc345
Beginner
Posts: 7
Joined: Mon Aug 24, 2020 8:02 pm

Parameter setting from cfclient not working

Post by marc345 »

Hi everybody

Last October I started a project with the CF, I built my application on top of the most recent firmware back then. Now I wan't to verify the accuracy of my system (new version of the EKF). For that I have built a custom deck driver which runs a task that can fly predefined trajectories. The trajectory flight is started from the cfclient by the setting of a parameter. I noticed however that the setting of a parameter from the cfclient does not work with my firmware. Everytime I set a parameter the respective field turns red and the new parameter value is not applied instead the value that was there before just stays.
This happens for all parameters, not only the ones of my new deck driver.

I tried with the current firmware from March 2021 and in there the parameter setting works correctly, also my deck driver works properly and the flught of the trajectory is correctly executed.

On the screenshot below you can see the red fields for the parameters destX, destY and fly_command that I wanted to set, they all have still they default values from the initalization in the code.

Image

Could there be some discrepancies between my old firmware and the cfclient? Or is there some location in the firmware were I can look at to see why the parameter setting is not working?

I only made modifications the the estiamtion_kalman and kalman_core files and also in the deck_spi file.

All the best
Marc
marc345
Beginner
Posts: 7
Joined: Mon Aug 24, 2020 8:02 pm

Re: Parameter setting from cfclient not working

Post by marc345 »

I solved the issue myself:

I'm working with a external chip on a custom extension deck to which I ported the Kalman filter state estimator, the new chip now directly interfaces with the optical flow sensor on the CF, therefore I no longer need the flowdeck_v1v2 task and thus I excluded the following line from the Makefile:

Code: Select all

PROJ_OBJ += flowdeck_v1v2.o
it turns out when I included the line again, and just commented out the creation of the flow task in the flowdeckInit() function the parameter setting works again. Strangely I also exprienced the "Task dump" button in the cfclient was not working before, this function now also works again.

All the best
Marc
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Parameter setting from cfclient not working

Post by kimberly »

Hi!

Thanks for giving us an update on this. We did experience the same problem if the exact same parameter was defined in two places in the code. There is a elf sanity script in the tools folder that you can try out next time!
Post Reply