DLR-SR / ThermofluidStream

The DLR Thermofluid Stream Library
BSD 3-Clause "New" or "Revised" License
65 stars 27 forks source link

Sensor update #215

Open RaphaelGebhart opened 1 month ago

RaphaelGebhart commented 1 month ago

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 #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.