diff options
author | xengineering <mail2xengineering@protonmail.com> | 2021-06-17 09:00:07 +0200 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2021-06-17 11:27:05 +0200 |
commit | 52972b810a9a42cef5c88f9947d64a0705f243ac (patch) | |
tree | 6ce0307a030bb5279a695506868a424f6ab6599c /src/state.go | |
parent | 591097e5a3741432e2acd9c41fadd4eb10678674 (diff) | |
download | birdscan-52972b810a9a42cef5c88f9947d64a0705f243ac.tar birdscan-52972b810a9a42cef5c88f9947d64a0705f243ac.tar.zst birdscan-52972b810a9a42cef5c88f9947d64a0705f243ac.zip |
Implement single Picture Mode
Diffstat (limited to 'src/state.go')
-rw-r--r-- | src/state.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state.go b/src/state.go index 10c35ef..eaf3bfa 100644 --- a/src/state.go +++ b/src/state.go @@ -29,7 +29,7 @@ type MachineTransition struct { to string } -type HookFunction func(string, string) +type HookFunction func(string, string, *Machine) // This will run the statemachine (blocking). func (m *Machine) Run() { @@ -110,7 +110,7 @@ func (m *Machine) processEvent(event string) string { *listener <- next } - m.hook(current, next) // execute registered callback function + m.hook(current, next, m) // execute registered callback function m.current = next // set new state return next } |