Main body of modules

hey
I have problem with finding the main loop of a task module in px4. for example in /~/PX4-Autopilot/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp we have a main function that will be execute when NuttX reaches to line “fw_pos_control_l1 start” in “rc.fw_apps”. but in that main function and its recursively internal functions there isn’t any main while loop to be considered as the task main loop.
can any body help me with that? i want to modify the attitude setpoints (pitch and yaw) when a certain condition is happened and because of that I need the main loop of the task to insert my condition and reform the output setpoint generation by my will.

Some of the modules run in the work_queue. You can get an overview when you type work_queue status into the nsh (NuttShell, or also called MAVLink shell).

The functions which get called at certain intervals are usually called Modulename::Run().

1 Like

thanks Julian it wad really helpful. I have another problem and I will be really appreciated if you guide me on it too.
In structures containing uORB topics there are fields named timestamp, timestamp_sample, ref_timestamp, etc.
I can’t uderstand the difference between them. for example “timestamp”: does it contain the time of associated topic update or it stores the absulute time independently?
what about timestamp_sample?
they both are in the vehicle_local_pos_s structure