v01.yaml has .quiet=true to cause all button pushes to become releases
parent
24ae45896f
commit
74717609ec
|
|
@ -20,3 +20,4 @@ players:
|
||||||
2: 6
|
2: 6
|
||||||
3: 7
|
3: 7
|
||||||
4: 8
|
4: 8
|
||||||
|
quiet: false
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,5 @@ type config struct {
|
||||||
Players []struct {
|
Players []struct {
|
||||||
Transformation transformation
|
Transformation transformation
|
||||||
}
|
}
|
||||||
|
Quiet bool
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,3 +17,4 @@ players:
|
||||||
b: "2"
|
b: "2"
|
||||||
x: "3"
|
x: "3"
|
||||||
y: "4"
|
y: "4"
|
||||||
|
quiet: false
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,13 @@ func (v01 *V01) Read() []button.Button {
|
||||||
}
|
}
|
||||||
v01.telemetry(msg)
|
v01.telemetry(msg)
|
||||||
|
|
||||||
return v01.transform(msg).buttons()
|
buttons := v01.transform(msg).buttons()
|
||||||
|
if v01.cfg.Quiet {
|
||||||
|
for i := range buttons {
|
||||||
|
buttons[i].Down = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return buttons
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v01 *V01) telemetry(msg message) {
|
func (v01 *V01) telemetry(msg message) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue