- Add a private property, ToggleState, to track the switch state.
- In the button push function, toggle this state between true and false.
- Update the Simulink switch parameter ('sw') based on the ToggleState.
- Verify the simulation mode supports real-time updates.
- Confirm the path and parameter name used in set_param calls are correct.