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

Screen files for vme-300 EVM and EVR #187

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

hongran
Copy link
Contributor

@hongran hongran commented Oct 2, 2024

1: Some of the existing screens (mostly subscreens) are updated: fixing version compatibility, color and size
2: Added screens and subscreens for evm-vme-300
3: Added screens and subscreens for evr-vme-300

The screens for the mtca cards are mostly intact. I made minimal size adjustments to make things fit.

@jerzyjamroz
Copy link
Contributor

@agaget , could you test if it works fine for you?

@agaget
Copy link
Contributor

agaget commented Oct 3, 2024

Thanks for adding VME.
Can you please add the card in the launcher please ?

And the color doesn't work for me. Please use Macro and not directly color code. If you want a different color use your own color.def.
The macro names used try to respect established color name. For example "Header_background" already exist in default color.def
I have added "Header_2_Background"

@agaget
Copy link
Contributor

agaget commented Oct 3, 2024

Thanks for adding VME. Can you please add the card in the launcher please ?

And the color doesn't work for me. Please use Macro and not directly color code. If you want a different color use your own color.def. The macro names used try to respect established color name. For example "Header_background" already exist in default color.def I have added "Header_2_Background"

My bad you have used macro, but it doesn't work for me either. The color def used is in the directory.

To illustrate the difference: your bob and then mine

image

If you want your read and write to use the same color, you can use in you color.def something like that
Read_Background=Write_Background

@jerzyjamroz jerzyjamroz assigned agaget and unassigned jerzyjamroz Oct 3, 2024
@hongran
Copy link
Contributor Author

hongran commented Oct 3, 2024

Thanks for adding VME. Can you please add the card in the launcher please ?
And the color doesn't work for me. Please use Macro and not directly color code. If you want a different color use your own color.def. The macro names used try to respect established color name. For example "Header_background" already exist in default color.def I have added "Header_2_Background"

My bad you have used macro, but it doesn't work for me either. The color def used is in the directory.

To illustrate the difference: your bob and then mine

image

If you want your read and write to use the same color, you can use in you color.def something like that Read_Background=Write_Background

HI @agaget , my bob looks like this.
image
I use the same text color but the background color for read and write are different. I don't know why it didn't show different colors in your machine.
Could you let me know what version of CSSPhoebus are you using now? Let's find a solution that is compatible for both of us.

@hongran
Copy link
Contributor Author

hongran commented Oct 3, 2024

I just rebased my commits to the updated master branch and added the vme screens to the launch panel.

<height>19</height>
<foreground_color>
<color name="Write_Foreground" red="0" green="255" blue="255">
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not the version of Phoebus that matter. Here the problem is that you've removed the macro Write_Foreground, same on different place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will be something like this.
image
I guess I need to change the default background of the text input and text update.
Do you prefer the following style?
image

Do you have a specific background color for the text update and text entry? I am OK with any color as long as the contrast between the foreground and background is enough.

Thanks!

Ran Hong

Copy link
Contributor

@agaget agaget Oct 8, 2024

Choose a reason for hiding this comment

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

I think we don't understand each other.
I don't care about the color, but I care about the respect of the color name macro.

As an example I use the file color.def there : https://github.com/epics-modules/mrfioc2/blob/master/opi/bob/color.def

If you don't know the color.def file, it's just a file where you define the code rgb of a macro. The advantage is that from a project to another if we have a different color convention, you just have to change your own color.def but not the bob files.
(the same exist with the font, but I don't use one)

In phoebus configuration file you can define which files to use there :

# Display configuration
org.csstudio.display.builder.model/color_files=color.def
org.csstudio.display.builder.model/font_files=font.def
org.phoebus.ui/welcome=welcome.html

I have tried in the color.def in the repo to be as close as possible as the standard name to be a maximum compliant with everyone

Copy link
Contributor Author

Choose a reason for hiding this comment

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

HI @agaget ,

Indeed I didn't know that the default color can be configured in this way. I used the color.def from the repository and updated the foreground colors of the read/write fields.

Could you take a look at the commit that I just pushed?

Thanks for your instructions on defining the color macros.

Ran Hong

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BTW, the reason why I removed the macro Write_Foreground in the first place was that I planned to use the default color for the text entry, which is the macro "Text". My default color.def has different colors for read and write background colors.

I like the idea to have Write_Foreground and Read_Foreground, so people have more flexibility to make their own color schemes using color.def.

@@ -1162,10 +1133,6 @@ $(pv_value)</tooltip>
<color name="Header_2_ForeGround" red="255" green="255" blue="255">
</color>
</foreground_color>
<line_color>
<color name="Header_2_Background" red="114" green="159" blue="207">
Copy link
Contributor

Choose a reason for hiding this comment

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

You've removed all the "Header_2_Background" please put it back.
Otherwise It uses the Macro "Grid" by default.
You can use
Header_2_Background=Grid in your color.def if you prefer the original Grid color.

If you can be compliant with that in your VME bobs, it would be perfect too.

Copy link
Contributor Author

@hongran hongran Oct 9, 2024

Choose a reason for hiding this comment

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

I can add back the foreground_color section:
<foreground_color> <color name="Header_2_ForeGround" red="255" green="255" blue="255"> </color> </foreground_color>

The line_color section causes an error while loading the screen.
<line_color> <color name="Header_2_Background" red="114" green="159" blue="207"> </color> </line_color>

image
After saving the screen I found that cssphoebus removed this section. Seems that the group widget does not have a property line_color.

I just updated the screens so all groups have the Header_2_ForeGround as the foreground_color.

Copy link
Contributor

Choose a reason for hiding this comment

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

Line_color was added by a student of us few month ago, I think you are not using the last version of Phoebus. I am using Phoebus v4.7.4.
I should indicate the minimum version of the bob in the README

@@ -14,10 +13,6 @@
<x>86</x>
<width>37</width>
<height>19</height>
<foreground_color>
<color name="Write_Foreground" red="0" green="255" blue="255">
Copy link
Contributor

Choose a reason for hiding this comment

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

same here please for Write_foreground

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done in the last push.

@agaget
Copy link
Contributor

agaget commented Oct 10, 2024

For now still too many modifications that break previous installations.
Just go through https://github.com/epics-modules/mrfioc2/pull/187/files and you will see all the macros removed. Maybe some revert will be easier to handle

Also you've change witdh for some bob. It messes up all the other bob using them. Example for _evroutput.bob but I spot problems for other

In MTCA EVR then and now
image Not a big deal but character are now way smaller, and we have to change all the width of all the ouputs

@hongran
Copy link
Contributor Author

hongran commented Oct 10, 2024

For now still too many modifications that break previous installations. Just go through https://github.com/epics-modules/mrfioc2/pull/187/files and you will see all the macros removed. Maybe some revert will be easier to handle

Also you've change witdh for some bob. It messes up all the other bob using them. Example for _evroutput.bob but I spot problems for other

In MTCA EVR then and now image Not a big deal but character are now way smaller, and we have to change all the width of all the ouputs

Probably it is easier for me to keep all the files used by mtca systems intact. If I need to adapt any subscreens to the VME system, I will add a separate file. I will make this change today.

@hongran
Copy link
Contributor Author

hongran commented Oct 10, 2024

@agaget I just reverted all the files the mtca screens are using. Now in the file list there are only new files except for the launcher.

@agaget
Copy link
Contributor

agaget commented Oct 11, 2024

Ok now it is working well.

Last thing, which phoebus version do you use ? can you upgrade at least to 4.7.4 ?
I think it's a shame that VME and MTCA doesn't use the same "philosophy". I think it's due to the lack of the option "Line color" in your version.
See between MTCA and VME
image

MTCA Bob->

      <foreground_color>
        <color name="Header_2_ForeGround" red="255" green="255" blue="255">
        </color>
      </foreground_color>
      <line_color>
        <color name="Header_2_Background" red="114" green="159" blue="207">
        </color>
      </line_color>
      <background_color>
        <color name="Group_Background" red="240" green="240" blue="240">
        </color>
      </background_color>

VME Bob ->

    <foreground_color>
      <color name="Header_2_ForeGround" red="255" green="255" blue="255">
      </color>
    </foreground_color>
    <background_color>
      <color name="Group_Background" red="240" green="240" blue="240">
      </color>
    </background_color>

I think it's better if we develop on the same version of phoebus.

After I swear I will accept your merge ;)

@hongran
Copy link
Contributor Author

hongran commented Oct 15, 2024

Ok now it is working well.

Last thing, which phoebus version do you use ? can you upgrade at least to 4.7.4 ? I think it's a shame that VME and MTCA doesn't use the same "philosophy". I think it's due to the lack of the option "Line color" in your version. See between MTCA and VME image

MTCA Bob->

      <foreground_color>
        <color name="Header_2_ForeGround" red="255" green="255" blue="255">
        </color>
      </foreground_color>
      <line_color>
        <color name="Header_2_Background" red="114" green="159" blue="207">
        </color>
      </line_color>
      <background_color>
        <color name="Group_Background" red="240" green="240" blue="240">
        </color>
      </background_color>

VME Bob ->

    <foreground_color>
      <color name="Header_2_ForeGround" red="255" green="255" blue="255">
      </color>
    </foreground_color>
    <background_color>
      <color name="Group_Background" red="240" green="240" blue="240">
      </color>
    </background_color>

I think it's better if we develop on the same version of phoebus.

After I swear I will accept your merge ;)

The version we are using is 4.6.6 and we are in the process of upgrading to 4.7.3. I think it supports line_color, too. I can use one of their test-build and update the files I added. Maybe some of the files can be shared now. Let me work on it and get back to you.

@hongran hongran force-pushed the bob-dev2 branch 2 times, most recently from 54be3e9 to 61b2e0a Compare October 15, 2024 21:46
@hongran
Copy link
Contributor Author

hongran commented Oct 15, 2024

@agaget I just updated the files I added for the VME cards. Now the evg-seq and evr-expert files can be shared.
Please take a look at the files that I modified: the launcher, evr-expert.bob and evr-cml-pat40.bob.

Best regards!

Ran Hong

Copy link
Contributor

@agaget agaget left a comment

Choose a reason for hiding this comment

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

It seems nice to me !
Thanks for complying to my requests :)

@agaget
Copy link
Contributor

agaget commented Oct 16, 2024

@jerzyjamroz I let you merge then ?

@jerzyjamroz jerzyjamroz merged commit d63462a into epics-modules:master Oct 16, 2024
@hongran
Copy link
Contributor Author

hongran commented Oct 16, 2024

It seems nice to me ! Thanks for complying to my requests :)

My pleasure to learn the way you handled the screens. At APS, people have been using another color scheme for a long time. With the macros it will be easy to adapt to that scheme.

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

Successfully merging this pull request may close these issues.

3 participants