aboutsummaryrefslogtreecommitdiffstats
path: root/ui.go
diff options
context:
space:
mode:
authorsam-anthony <samanthony6@protonmail.com>2022-03-26 15:56:22 -0230
committersam-anthony <samanthony6@protonmail.com>2022-03-26 15:56:22 -0230
commit0c5d33fc817047ab2c2c9dd3ed6784c032755819 (patch)
tree2bbd7896ddff8c623a7a631307b5fc51689ada34 /ui.go
parent713b65d414e327db7b530ce0be8403bc0ff4ff3b (diff)
downloadvolute-0c5d33fc817047ab2c2c9dd3ed6784c032755819.zip
intake air temperature
Diffstat (limited to 'ui.go')
-rw-r--r--ui.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/ui.go b/ui.go
index dd12b06..57765a3 100644
--- a/ui.go
+++ b/ui.go
@@ -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"),