Skip to content
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

ENH: color the circles based on alarm severity #89

Closed
wants to merge 2 commits into from

Conversation

ZLLentz
Copy link
Member

@ZLLentz ZLLentz commented May 10, 2021

Seems to work, needs more testing and some looking over probably.

Rather than waiting for upstream alarm support, let's just get out something useful. Can refactor later, this didn't take very long to implement.

begins #86
tracked at https://jira.slac.stanford.edu/browse/LCLSECSD-14

image

@ZLLentz
Copy link
Member Author

ZLLentz commented May 21, 2021

I suspect this needs to be reworked a bit to run on qt's signal/slots system, but I'm not 100% sure. There is some performance degradation on load and I assume it's related to the ophyd thread (which is why I didn't push to merge yet)

@klauer
Copy link
Contributor

klauer commented May 21, 2021

I think you're right as to needing signals/slots: setStylesheet itself probably isn't even safe to call from the ophyd dispatcher thread (even if it isn't crashing now).

@ZLLentz
Copy link
Member Author

ZLLentz commented May 21, 2021

I'm not seeing the performance issues I saw previously- but yeah, I'm going to rework to avoid issues like you are describing. I haven't had time to really test this overall, I suppose it needs a pamm where I can intentionally cause alarm states and disconnects/reconnects.

To do this properly I might need to set up a bunch of pydm channels per device- and at that point it seems like something to handle in typhos.

@klauer
Copy link
Contributor

klauer commented May 21, 2021

Maybe a mock IOC where you can easily set status/severity to play around with it? caproto would be easy, and softIoc not so bad either

@ZLLentz
Copy link
Member Author

ZLLentz commented May 21, 2021

Ah, good point, and then if I do it in typhos e.g. making classes like TyphosAlarm (summarizes alarm state, offers some signals) and TyphosAlarmIndicator for display it becomes pretty straightforward to test on a smaller scale. Then it can be brought here for the grid.

@klauer
Copy link
Contributor

klauer commented May 21, 2021

I like that plan quite a bit - keeping it nice and reusable as TyphosAlarm*

@klauer
Copy link
Contributor

klauer commented Jun 28, 2021

This will be superseded by an upcoming LUCID PR, using pcdshub/typhos#441
(A reminder to close this when you get back, Zach)

@ZLLentz
Copy link
Member Author

ZLLentz commented Jul 6, 2021

Yes, indeed, closing in favor of #91

@ZLLentz ZLLentz closed this Jul 6, 2021
@ZLLentz ZLLentz deleted the colored-circles branch July 6, 2021 20:22
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.

2 participants