diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-01-19 22:54:28 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-01-19 22:54:28 -0500 |
| commit | cb4343f838b008e3f4da2bf85937ed86cd1805e1 (patch) | |
| tree | 4251616277835db0810c38bfa3357606455a674d /main.go | |
| parent | 95944c92c6d9171e3a8a2619e62bbfa29d48bfef (diff) | |
| download | volute-cb4343f838b008e3f4da2bf85937ed86cd1805e1.zip | |
add VE row
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -28,14 +28,16 @@ func run() { var ( displacementChan = make(chan uint) rpmChan = make([]chan uint, POINTS) - focus = NewFocus(1 + POINTS) + veChan = make([]chan uint, POINTS) + focus = NewFocus(1 + 2*POINTS) ) for i := 0; i < POINTS; i++ { rpmChan[i] = make(chan uint) + veChan[i] = make(chan uint) } bounds := layout.Grid{ - Rows: []int{2, 8, 8}, + Rows: []int{2, 7, 7}, Background: color.Gray{255}, Gap: 1, Split: split, @@ -53,13 +55,19 @@ func run() { focus.widgets[0], mux.MakeEnv(), ) - go widget.Label("speed (rpm)", bounds[2], mux.MakeEnv()) - for i := 0; i < len(rpmChan); i++ { + go widget.Label("VE (%)", bounds[3+POINTS], mux.MakeEnv()) + for i := 0; i < POINTS; i++ { go widget.Input( rpmChan[i], - bounds[i+3], - focus.widgets[i+1], + bounds[3+i], + focus.widgets[1+i], + mux.MakeEnv(), + ) + go widget.Input( + veChan[i], + bounds[3+POINTS+1+i], + focus.widgets[1+POINTS+i], mux.MakeEnv(), ) } |