Skip to content

Conversation

@MikeMcPherson
Copy link
Contributor

Related Issue(s) #3897
Has Unit Tests (y/n) y
Documentation Included (y/n) y

Change Description

Adds calls to cmdResponse_out in Svc::OsTime::SetCurrentTime_cmdHandler for both OK and EXECUTION_ERROR conditions.

Rationale

Fixes #3897.

Testing/Review Recommendations

Run unit tests

Future Work

None

@thomas-bc
Copy link
Collaborator

Thanks!

@MikeMcPherson
Copy link
Contributor Author

I'm basing our next mission at the University of Virginia on F' and I want to give something back. This is my first pull request on this project, so pardon me if I totally screwed up!

Thanks. Mike

Copy link
Collaborator

@thomas-bc thomas-bc left a comment

Choose a reason for hiding this comment

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

Looks like the helper method is spelled out incorrectly. Should look like

this->cmdResponse_out(<args>);

@MikeMcPherson
Copy link
Contributor Author

Whoops, forgot to click "Save" before I pushed!

@MikeMcPherson MikeMcPherson requested a review from thomas-bc July 23, 2025 22:41
Os::RawTime::Status stat = time_now.now();
if (stat != Os::RawTime::OP_OK) {
this->log_WARNING_HI_SetCurrentTimeError(stat);
this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter opCode has not been checked.
Os::RawTime::Status stat = time_now.now();
if (stat != Os::RawTime::OP_OK) {
this->log_WARNING_HI_SetCurrentTimeError(stat);
this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter cmdSeq has not been checked.
m_epoch_fw_time = Fw::Time(seconds_now, 0);
m_epoch_os_time = time_now;
m_epoch_valid = true;
this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter opCode has not been checked.
m_epoch_fw_time = Fw::Time(seconds_now, 0);
m_epoch_os_time = time_now;
m_epoch_valid = true;
this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter cmdSeq has not been checked.
@MikeMcPherson
Copy link
Contributor Author

One thing I'm not clear on: do I close the PR or do you close it?

Thanks. Mike

@thomas-bc thomas-bc merged commit 723524c into nasa:devel Jul 24, 2025
49 checks passed
@thomas-bc
Copy link
Collaborator

We're all set! Thanks a lot for the contribution @MikeMcPherson

@MikeMcPherson
Copy link
Contributor Author

Thank you, happy to be able to contribute! I'll try somethiing more difficult next time.

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.

OsTime::SetCurrentTime_cmdHandler does not call this->cmdResponse_out

4 participants