Skip to content

Fix the output type on the get_<taskname>_output() methods#426

Merged
gbin merged 1 commit into
masterfrom
matthewashtonk/fix_get_output_helper_methods
Sep 2, 2025
Merged

Fix the output type on the get_<taskname>_output() methods#426
gbin merged 1 commit into
masterfrom
matthewashtonk/fix_get_output_helper_methods

Conversation

@matthewashton-k

Copy link
Copy Markdown
Collaborator

I noticed when I was implementing resimulation for my project that the get_taskname_output() methods had the wrong return type, for example:

            default::SimStep::MotorCtrl(CuTaskCallbackState::Process(_, output)) => {
                *output = msgs.get_motor_ctrl_output().clone();
                SimOverride::ExecutedBySim
            }
    |
133 |                 *output = msgs.get_motor_ctrl_output().clone();
    |                 -------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `CuStampedData<(), CuMsgMetadata>`, found `CuStampedData<CuGstBuffer, CuMsgMetadata>`
    |                 |
    |                 expected due to the type of this binding
    |
    = note: expected struct `cu29::prelude::CuStampedData<(), _>`
               found struct `cu29::prelude::CuStampedData<cu_gstreamer::CuGstBuffer, _>`

So I did some digging and found out that the ordering of taskid_call_order and all_msgs_types_in_culist_order dont match up and the mapping was incorrect.

Ill keep this a draft pull request until tomorrow when I'll go ahead and try the balance bot re simulation just to make sure this doesn't break anything.

@matthewashton-k matthewashton-k marked this pull request as ready for review September 2, 2025 03:52
@matthewashton-k

Copy link
Copy Markdown
Collaborator Author

Alright I've done some more testing and I'm confident this fixes it.

@matthewashton-k matthewashton-k requested a review from gbin September 2, 2025 03:54
@gbin

gbin commented Sep 2, 2025

Copy link
Copy Markdown
Collaborator

Well spotted, thanks.

@gbin gbin merged commit 5c98b43 into master Sep 2, 2025
6 checks passed
@gbin gbin deleted the matthewashtonk/fix_get_output_helper_methods branch September 2, 2025 14:07
@makeecat makeecat added the bug Something isn't working label Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants