개정판 4aa060ea
issue #1202: calculate press drop
Change-Id: I70e77a77f03ea80410da0f9b838b5b29c0be95d9
HYTOS/HYTOS/BatteryLimit.py | ||
---|---|---|
64 | 64 |
self.ui.label_PressureUnit.setText('{}(g)'.format(attr[1]['Pressure'])) |
65 | 65 |
self.ui.label_ElevationUnit.setText(attr[1]['Length']) |
66 | 66 |
|
67 |
matches = [connector.nozzle_data for connector in self._item.connectors if connector.nozzle_data]
|
|
67 |
matches = [connector.data for connector in self._item.connectors if connector.data]
|
|
68 | 68 |
if matches: |
69 | 69 |
pressure = matches[0].pressure |
70 | 70 |
if pressure: |
... | ... | |
80 | 80 |
from EngineeringConnectorItem import NozzleData |
81 | 81 |
|
82 | 82 |
for connector in self._item.connectors: |
83 |
if not connector.nozzle_data:
|
|
84 |
connector.nozzle_data = NozzleData()
|
|
83 |
if not connector.data: |
|
84 |
connector.data = NozzleData() |
|
85 | 85 |
|
86 | 86 |
pressure = self.ui.lineEdit_Pressure.text() |
87 | 87 |
if pressure: |
88 |
connector.nozzle_data.pressure = float(pressure)
|
|
88 |
connector.data.pressure = float(pressure) |
|
89 | 89 |
else: |
90 |
connector.nozzle_data.pressure = None
|
|
90 |
connector.data.pressure = None |
|
91 | 91 |
|
92 | 92 |
elevation = self.ui.lineEdit_Elevation.text() |
93 | 93 |
if elevation: |
94 |
connector.nozzle_data.elevation = float(elevation)
|
|
94 |
connector.data.elevation = float(elevation) |
|
95 | 95 |
else: |
96 |
connector.nozzle_data.elevation = None
|
|
96 |
connector.data.elevation = None |
|
97 | 97 |
|
98 | 98 |
QDialog.accept(self) |
99 | 99 |
|
내보내기 Unified diff