-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add PanelTestMode suppport to smx class #42
base: main
Are you sure you want to change the base?
Conversation
this.testModeIntervalHandle = setInterval(() => { | ||
this.events.output$.push(Uint8Array.of(API_COMMAND.SET_PANEL_TEST_MODE, mode)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think there's probably a better way to do this with the BaconJS interval to generate a stream of regular events that we can use for this. I'll add the UI for this first and worry about thinking through the better version of this interval later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah interesting. Would just need a way to tell it to stop since it says indefinitely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I think you would chain the interval stream with a takeUntil
that watches another event stream (maybe a bus we can manually emit from) for a stop signal.
// TODO: Do I need to call this to consume the event? | ||
this.events.ackReports$.firstToPromise(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need to worry about consuming these. I think because they are acks to unattended commands we can just let them silently discarded in the background.
Can't test today, but added a checkbox in the UI for this |
Decided to finally come back to this for some reason... (no mystery on why it took so long, PR was originally opened 4 days before my son was born 😁) Turning on test mode does turn off the lights on the pad, but I'm not actually getting any of the test mode lights in place of the idle patterns. I have to assume this is an issue with our app since my stages work as expected with the pressure test mode toggle in the SMX software (don't have a convenient way to test the windows config app right now) |
Modeled off of source code, but not tested. Will need a checkbox/slider to turn panel test mode on and off