Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Sensor update #215

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

Conversation

RaphaelGebhart
Copy link
Contributor

@RaphaelGebhart RaphaelGebhart commented Oct 14, 2024

  1. default value 0.0 instead of value (according to Modelica.Blocks.Interaction.Show.RealValue)

  2. significant digits DynamicSelect(" 0.0 ", " "+String(value,significantDigits=digits)+" ") instead of DynamicSelect("value", String(value,format="1."+String(digits)+"f")) (according to Modelica.Blocks.Interaction.Show.RealValue)

  3. defaultComponentName = "sensor" instead of "singleSensorSelect" because both "single" and "select" are meaningless in my opinion (i would actually appreciate if we changed the sensor component names)

  4. Rectangle(extent={{-60,30},{60,-30}}) implies Text(extent={{-60,26},{60,-26}}), i.e. text is smaller (vertical) than the surrounding rectangle. horizontally this is considered by white spaces " "+String(value,significantDigits=digits)+" " (according to Modelica.Blocks.Interaction.Show.RealValue)

  5. better usage of available space (x_min = -80, instead of x_min = -60 and (x_max = +80, instead of x_max = +60 to maintain symmetry), i.e. Text(extent={{-80,26},{80,-26}}) instead of Text(extent={{-60,26},{60,-26}}), adapted the shadow and removed the line which is not visible anymore now Line(points={{-100,0},{0,0}},color={28,108,200},thickness=0.5)

  6. text color black instead of blue: better to read and better to distinguish sensor value <-> fluid flow
    Sensor3
    Sensor2

  7. output connector position according to MSL, i.e. Placement(transformation(extent={{100,-10},{120,10}})) and adapt the corresponding line

  8. adapt Sensors.MultiSensor_Tpm (etc.) to the changes, i.e. move the unit display, e.g. Text(visible=not outputTemperature,extent={{150,67},{90,37}}, textString=temperatureString, horizontalAlignment=TextAlignment.Left), and move the complete box upwards by 10px to be similar to Sensors.SingleFlowSensor

  9. removed iconTransformation = ... if transformation = ... is sufficient, similar to Annotation update + use of defaultComponentName #214

  10. using adaptDisplay which will yield 1) if outputVale==true, that value is not displayed (only quantityString), 2) if outputVale==false, that quantityString is displayed on the right of the sensor display, instead of below/above.

…se 'digits' as significantDigits instead of decimal places (nachkommastellen), i.e. 'DynamicSelect(' 0.0 ', ' '+String(value,significantDigits=digits)+' ')'
@RaphaelGebhart RaphaelGebhart self-assigned this Oct 14, 2024
@RaphaelGebhart RaphaelGebhart marked this pull request as draft October 14, 2024 16:22
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant