protocol should be pkg
parent
ea7f2d8932
commit
9990273b19
|
|
@ -0,0 +1,21 @@
|
|||
package wrap
|
||||
|
||||
import "mayhem-party/src/device/input/raw"
|
||||
|
||||
type Protocol struct {
|
||||
src raw.Raw
|
||||
}
|
||||
|
||||
func NewProtocol(src raw.Raw) Protocol {
|
||||
return Protocol{
|
||||
src: src,
|
||||
}
|
||||
}
|
||||
|
||||
func (p Protocol) Close() {
|
||||
p.src.Close()
|
||||
}
|
||||
|
||||
func (p Protocol) Read() []Button {
|
||||
panic(nil)
|
||||
}
|
||||
|
|
@ -16,6 +16,11 @@ func New(ctx context.Context, src raw.Raw) Wrap {
|
|||
maker := func() Wrap {
|
||||
return explicit{src: src}
|
||||
}
|
||||
if os.Getenv("WRAP_PROTOCOL") == "true" {
|
||||
maker = func() Wrap {
|
||||
return NewProtocol(src)
|
||||
}
|
||||
}
|
||||
if os.Getenv("WRAP_BUFFERED") == "true" {
|
||||
oldMaker := maker
|
||||
maker = func() Wrap {
|
||||
|
|
|
|||
|
|
@ -7,4 +7,5 @@ func TestWrap(t *testing.T) {
|
|||
var _ Wrap = &Refresh{}
|
||||
var _ Wrap = &Buffered{}
|
||||
var _ Wrap = &Remap{}
|
||||
var _ Wrap = Protocol{}
|
||||
}
|
||||
|
|
|
|||
18
todo.yaml
18
todo.yaml
|
|
@ -1,11 +1,9 @@
|
|||
todo:
|
||||
- input."Button" to interface or strings
|
||||
- input.UDP as a raw provider
|
||||
- input.MayhemParty as a logical wrapper
|
||||
- lag via UDP formatted inputs as space-delimited TS PID buttonIdx buttonIdx buttonIdx
|
||||
- change from 'a','b','c' from rust to just 11,21,31,41 so playerName is known implicitly
|
||||
from %10 but then gotta translate back to char for keyboard things somewhere; space
|
||||
delimited?
|
||||
- lag via UDP formatted inputs as space-delimited TS PID buttonIdx buttonIdx buttonIdx
|
||||
- input."Button" to interface or strings
|
||||
- input.MayhemParty as a logical wrapper from %10 but then gotta translate back to
|
||||
char for keyboard things somewhere; space delimited?
|
||||
- todo: rusty configs have "name" for each client
|
||||
details: |
|
||||
'if name == server_broadcasted_name { debug_print_in_gui(server_broadcasted_message) }'
|
||||
|
|
@ -32,3 +30,11 @@ done:
|
|||
ts: Fri Mar 24 17:00:55 MDT 2023
|
||||
- todo: '"Button" to interface or strings'
|
||||
ts: Fri Mar 24 17:01:01 MDT 2023
|
||||
- todo: input.UDP as a raw provider
|
||||
ts: Fri Mar 24 19:58:59 MDT 2023
|
||||
- todo: input.MayhemParty as a logical wrapper
|
||||
ts: Fri Mar 24 19:58:59 MDT 2023
|
||||
- todo: change from 'a','b','c' from rust to just 11,21,31,41 so playerName is known
|
||||
implicitly from %10 but then gotta translate back to char for keyboard things
|
||||
somewhere; space delimited?
|
||||
ts: Fri Mar 24 19:58:59 MDT 2023
|
||||
|
|
|
|||
Loading…
Reference in New Issue