From 52972b810a9a42cef5c88f9947d64a0705f243ac Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 17 Jun 2021 09:00:07 +0200 Subject: Implement single Picture Mode --- src/state.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/state.go') 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 } -- cgit v1.2.3-70-g09d2