diff options
| author | sam-anthony <samanthony6@protonmail.com> | 2022-03-26 15:56:22 -0230 |
|---|---|---|
| committer | sam-anthony <samanthony6@protonmail.com> | 2022-03-26 15:56:22 -0230 |
| commit | 0c5d33fc817047ab2c2c9dd3ed6784c032755819 (patch) | |
| tree | 2bbd7896ddff8c623a7a631307b5fc51689ada34 /ui.go | |
| parent | 713b65d414e327db7b530ce0be8403bc0ff4ff3b (diff) | |
| download | volute-0c5d33fc817047ab2c2c9dd3ed6784c032755819.zip | |
intake air temperature
Diffstat (limited to 'ui.go')
| -rw-r--r-- | ui.go | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -50,6 +50,35 @@ func volumetricEfficiencyRow() *g.TableRowWidget { ) } +func intakeAirTemperatureRow() *g.TableRowWidget { + return g.TableRow( + g.Label("Intake Air Temperature"), + g.Combo( + "", + temperatureUnitStrings()[selectedTemperatureUnit], + temperatureUnitStrings(), + &selectedTemperatureUnit, + ). + OnChange(func() { + s := temperatureUnitStrings()[selectedTemperatureUnit] + u, err := temperatureUnitFromString(s) + check(err) + + for i := range intakeAirTemperature { + t, err := intakeAirTemperature[i].asUnit(u) + check(err) + intakeAirTemperature[i] = temperature{t, u} + } + }), + g.InputFloat(&intakeAirTemperature[0].val).Format("%.2f"), + g.InputFloat(&intakeAirTemperature[1].val).Format("%.2f"), + g.InputFloat(&intakeAirTemperature[2].val).Format("%.2f"), + g.InputFloat(&intakeAirTemperature[3].val).Format("%.2f"), + g.InputFloat(&intakeAirTemperature[4].val).Format("%.2f"), + g.InputFloat(&intakeAirTemperature[5].val).Format("%.2f"), + ) +} + func manifoldPressureRow() *g.TableRowWidget { return g.TableRow( g.Label("Manifold Absolute Pressure"), |