Skip to content

Conversation

@Mf-ff99
Copy link

@Mf-ff99 Mf-ff99 commented Nov 19, 2025

Allows users the option to configure the ICE Control Module to trigger on/off states based on VTOL transition state for VTOLs utilizing a combustion engine

Tested in SITL

https://review.px4.io/plot_app?log=94bf9ec5-d621-4667-b77a-f19f2972ced0

@dakejahl dakejahl requested a review from sfuhrer November 19, 2025 17:27
dakejahl
dakejahl previously approved these changes Nov 19, 2025
@dakejahl
Copy link
Contributor

Hi Mark! Run make format and push again

Signed-off-by: Mf-ff99 <[email protected]>
…ionEngineControl.cpp to initialize vtol_vehicle_status_s correctly


Initialize appropriately

Co-authored-by: Jacob Dahl <[email protected]>
Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

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

Makes sense! Just some details to figure out, but the intent makes sense.

if ((vtol_status.vehicle_vtol_state == vtol_vehicle_status_s::VEHICLE_VTOL_STATE_FW ||
vtol_status.vehicle_vtol_state == vtol_vehicle_status_s::VEHICLE_VTOL_STATE_TRANSITION_TO_FW) &&
vehicle_status.arming_state == vehicle_status_s::ARMING_STATE_ARMED) {
user_request = UserOnOffRequest::On;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
user_request = UserOnOffRequest::On;
_user_request = UserOnOffRequest::On;

As it changed 2 weeks ago in https://github.com/PX4/PX4-Autopilot/pull/25923/files

Copy link
Contributor

Choose a reason for hiding this comment

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

You can just do
_user_request = vehilce_status.vehicle_type == VEHICLE_TYPE_FIXED_WING || vehilce_status.in_transition_to_fw;

#include <uORB/topics/vehicle_status.h>
#include <uORB/topics/rpm.h>
#include <uORB/topics/actuator_motors.h>
#include <uORB/topics/vtol_vehicle_status.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

You have all the info you need already in vehicle_status, see my other comment.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants