Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComponentTester.cpp from-port handlers not implemented #397

Closed
thomas-bc opened this issue Mar 12, 2024 · 1 comment · Fixed by #401
Closed

ComponentTester.cpp from-port handlers not implemented #397

thomas-bc opened this issue Mar 12, 2024 · 1 comment · Fixed by #401
Assignees
Labels
bug Something isn't working code generation Issues related to code generation
Milestone

Comments

@thomas-bc
Copy link
Contributor

thomas-bc commented Mar 12, 2024

We have seen reports of an issue (fprime-community/fprime-tutorial-math-component#26) in the MathComponent tutorial where the handler for Tester::from_mathOpOut_handler() is still marked as TODO after following the tutorial.

After some investigation, I have found that the Python autocoders used to implement that handler

  void Tester ::
    from_mathOpOut_handler(
        const NATIVE_INT_TYPE portNum,
        F32 val1,
        const MathModule::MathOp &op,
        F32 val2
    )
  {
    this->pushFromPortEntry_mathOpOut(val1, op, val2);
  }

Where fpp-to-cpp autocodes

  void Tester ::
    from_mathOpOut_handler(
        const NATIVE_INT_TYPE portNum,
        F32 val1,
        const MathModule::MathOp &op,
        F32 val2
    )
  {
    // TODO
  }

Is this something we can get fpp-to-cpp to do as well?

@bocchino bocchino self-assigned this Mar 12, 2024
@bocchino bocchino added bug Something isn't working code generation Issues related to code generation labels Mar 12, 2024
@bocchino
Copy link
Collaborator

Yes, we should fix this. Also, we should get that code out of the user-edited template and into the auto-generated code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code generation Issues related to code generation
Projects
Development

Successfully merging a pull request may close this issue.

2 participants