pcdshub / lucid

LCLS User Control and Interface Design
https://pcdshub.github.io/lucid/
Other
4 stars 6 forks source link

LAS BTS Vacuum Screen Broken #108

Open slactjohnson opened 1 year ago

slactjohnson commented 1 year ago

In the time since ~Tuesday morning and now, something appears to have broken the LAS BTS vacuum screen. See below.

Placing this issue in this repo at @klauer 's request, since it's not really clear where this problem originates.

image

klauer commented 1 year ago

Repository is here: https://github.com/pcdshub/l2si-beam-transport-system-displays

klauer commented 1 year ago

PyDM v1.11.1 to v1.12.0 change apparently caused this: image

ZLLentz commented 1 year ago

PyDMDrawingLine's default orientation was flipped 90 degrees at some point

edit: the default orientation was changed from 45 degrees to 0 degrees, but that should have only affected lines that were using "default/unset" rotation

klauer commented 1 year ago

Even fixing the rotation is insufficient: the line doesn't fill the bounding box of the widget. I'll attach a screenshot in a bit.

ZLLentz commented 1 year ago

Here's the relevant pull request with all the details of the changes that must be affecting this: https://github.com/slaclab/pydm/pull/745

My read is that the original behavior was "draw a line from bottom left to top right (or is it top left to bottom right?) inside the bounding box and then rotate it with a default rotation of 45 degrees" while the new behavior is "draw a line from the left side to the right side of the bounding box and then rotate it with a default rotation of 0 degrees"

klauer commented 1 year ago

So to make a long vertical line, you have to make an extremely large bounding box for the line. Here's a rotation=90 deg line with a variety of widget sizes in the designer: Screenshot from 2022-09-09 11-22-15 Screenshot from 2022-09-09 11-22-19 Screenshot from 2022-09-09 11-22-22 Screenshot from 2022-09-09 11-22-29

No scaling has been applied to these images; they're a simple crop. Use the designer background grid for reference.

ZLLentz commented 1 year ago

So it draws from the left bounding box to the right and then rotates it around the middle point without extending it?

ZLLentz commented 1 year ago

This smells like a needed PyDM PR

klauer commented 1 year ago

I think you've got the right logic there @ZLLentz

ZLLentz commented 1 year ago

I can cook something up this afternoon, and we could even slap it into our dev env prior to any pydm tagging

klauer commented 1 year ago

The laser hall will be OK for now using an old PyDM, but I think we should get this fixed sooner rather than later regardless

ZLLentz commented 1 year ago

My fix got merged into PyDM already :tada:

ZLLentz commented 1 year ago

After the patch we'd probably need to make modifications to the screen still- we can do that whenever we deem it a good timing.