Skip to content

Conversation

@alessandroferraioli95
Copy link
Contributor

We need a way from an action to set some extra information about the current action, so those can gets exposed externally if wanted.

This commit adds an interface from the ActionHandler to set/clear the flight mode info into the mission_execturo

@alessandroferraioli95 alessandroferraioli95 force-pushed the feature/add-flight-mode-info branch from a0b3e4a to dea4246 Compare August 4, 2025 14:13


void onFlightModeInfoChange(const std::function<void(const std::optional<std::string>&)> & callback) { _on_flight_mode_info_change = callback; }
void setFlightModeInfo(const std::optional<std::string>& flightModeInfo);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you avoid the term flight mode? It can also be used on non-flying vehicles. Maybe 'activity info' would be better.

Can you add API docs for what the purpose of this is? Are there formatting constraints (i.e. can it be multiple lines)?

Should the info be cleared when moving on to the next mission item? Or when deactivating and on abort?

@alessandroferraioli95 alessandroferraioli95 force-pushed the feature/add-flight-mode-info branch from dea4246 to 7e7a1e9 Compare August 5, 2025 07:51
@alessandroferraioli95 alessandroferraioli95 changed the title [DRAFT] feat(mission_executor): expose flight mode info in action handler [DRAFT] Expose activity info Aug 5, 2025
@alessandroferraioli95 alessandroferraioli95 force-pushed the feature/add-flight-mode-info branch from 7e7a1e9 to feb34e8 Compare August 5, 2025 08:08
@bkueng bkueng force-pushed the takeoff-to-altitude branch from a5510df to 0b0de17 Compare August 6, 2025 13:52
@bkueng bkueng force-pushed the feature/add-flight-mode-info branch from feb34e8 to 998eca0 Compare August 6, 2025 13:54
@alessandroferraioli95 alessandroferraioli95 force-pushed the feature/add-flight-mode-info branch 3 times, most recently from 8cd3cb9 to 11d86e0 Compare August 6, 2025 14:29
/**
* @brief Clears the activity information.
* This method sets the activity info of the mission executor to `std::nullopt`.
* It should be called after an action is completed to ensure the state is properly reset.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's call this automatically when switching to the next waypoint, or when the mission is deactivated or aborted.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I saw that. It's an extra step that can easily be forgotten.

@alessandroferraioli95 alessandroferraioli95 force-pushed the feature/add-flight-mode-info branch from 11d86e0 to 37e0cf4 Compare August 7, 2025 13:59
@alessandroferraioli95 alessandroferraioli95 changed the title [DRAFT] Expose activity info Expose activity info Aug 7, 2025
@bkueng bkueng force-pushed the takeoff-to-altitude branch from f4afb3a to 644fb7e Compare September 2, 2025 11:11
@bkueng bkueng force-pushed the feature/add-flight-mode-info branch from 37e0cf4 to 030c980 Compare September 2, 2025 11:12
@eyeam3 eyeam3 force-pushed the takeoff-to-altitude branch from 644fb7e to 748b7c7 Compare November 24, 2025 15:08
@bkueng bkueng force-pushed the takeoff-to-altitude branch 2 times, most recently from 986409f to 45eba72 Compare December 8, 2025 13:43
@bkueng bkueng force-pushed the feature/add-flight-mode-info branch 2 times, most recently from 08a1785 to b9d0f45 Compare December 8, 2025 13:56
@bkueng bkueng force-pushed the takeoff-to-altitude branch 3 times, most recently from ac68a06 to e0f68dc Compare December 8, 2025 16:08
Base automatically changed from takeoff-to-altitude to main December 9, 2025 11:03
@bkueng bkueng force-pushed the feature/add-flight-mode-info branch from b9d0f45 to b44a064 Compare December 9, 2025 11:04
We need a way from an action to set some extra information about the current
activity, so those can gets exposed externally if wanted.

This commit adds an interface from the ActionHandler to set/clear the activity
 info into the mission_executor.

It will call the clear activty info when:
- switch next waypoint
- mission aborted
- mission deactivated
@bkueng bkueng force-pushed the feature/add-flight-mode-info branch from b44a064 to 98a3c14 Compare December 9, 2025 12:42
@bkueng bkueng merged commit b90f57d into main Dec 9, 2025
5 of 11 checks passed
@bkueng bkueng deleted the feature/add-flight-mode-info branch December 9, 2025 13:08
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