Skip to content

Conversation

@nateinaction
Copy link
Collaborator

@nateinaction nateinaction commented Nov 30, 2025

Description

This PR adds a port to the load switch to get the state to of the port. The PR also removes the reset port as requested during the software review on Nov 30.

Related Issues/Tickets

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Z Tests
  • Manual testing (describe steps)

Manually tested state get port in thermal manager changes. The thermal manager only tries to read the temp sensor if the load switch is turned on.

Screenshots / Recordings (if applicable)

Checklist

  • Written detailed sdd with requirements, channels, ports, commands, telemetry defined and correctly formatted and spelled
  • Have written relevant integration tests and have documented them in the sdd
  • Have done a code review with
  • Have tested this PR on every supported board with correct board definitions

Further Notes / Considerations

k_sleep(K_MSEC(100));
this->setLoadSwitchState(Fw::On::ON);
Fw::On LoadSwitch ::loadSwitchStateGet_handler(FwIndexType portNum) {
return this->getLoadSwitchState() && this->getTime() > this->m_on_timeout ? Fw::On::ON : Fw::On::OFF;
Copy link
Collaborator Author

@nateinaction nateinaction Nov 30, 2025

Choose a reason for hiding this comment

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

This is kind of funny and, at a minimum, need to be marked in the SDD. The state will only report as ON after some delay m_on_timeout which is currently hardcoded to 1s. This allows us to replicate the behavior from Michael's TCA_Up branch which waited 200ms "for power to stabilize" after turning the load switch on. We needed this to reliably enable devices on the load switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants