Skip to content

Add static_cast to ambiguous serialize call in FpySequencer #4008

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

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

ethancheez
Copy link
Contributor

Related Issue(s) N/A
Has Unit Tests (y/n) N
Documentation Included (y/n) N
Generative AI was used in this contribution (y/n) N

Change Description

Add static_cast<FwPacketDescriptorType> to serialize() call in FpySequencer

Rationale

Older compilers can't decide which overloaded option to use without being specific with a static_cast

/path/to/lib/fprime/Svc/FpySequencer/FpySequencerDirectives.cpp:292:48: error: call of overloaded 'serialize(ComCfg::APID::T)' is ambiguous
  292 |     Fw::SerializeStatus stat = cmdBuf.serialize(Fw::ComPacketType::FW_PACKET_COMMAND);
      |                                ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /path/to/lib/fprime/Fw/Com/ComPacket.hpp:11,
                 from /home/ethan/Git/jpl/fprime-tutorial-arduino-blinker/lib/fprime/Svc/FpySequencer/FpySequencerDirectives.cpp:2:
/path/to/lib/fprime/Fw/Types/Serializable.hpp:163:21: note: candidate: 'Fw::SerializeStatus Fw::SerializeBufferBase::serialize(U8)'
  163 |     SerializeStatus serialize(U8 val);
      |                     ^~~~~~~~~
/path/to/lib/fprime/Fw/Types/Serializable.hpp:164:21: note: candidate: 'Fw::SerializeStatus Fw::SerializeBufferBase::serialize(I8)'
  164 |     SerializeStatus serialize(I8 val);
      |                     ^~~~~~~~~
/path/to/lib/fprime/Fw/Types/Serializable.hpp:166:21: note: candidate: 'Fw::SerializeStatus Fw::SerializeBufferBase::serialize(U16)'
  166 |     SerializeStatus serialize(U16 val);

...

Testing/Review Recommendations

N/A

Future Work

N/A

AI Usage (policy)

N/A

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.

1 participant