diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/dolmetschctld/dolmetschctld.go | 4 | ||||
-rw-r--r-- | cmd/dolmetschctld/statemachine.go | 9 |
2 files changed, 4 insertions, 9 deletions
diff --git a/cmd/dolmetschctld/dolmetschctld.go b/cmd/dolmetschctld/dolmetschctld.go index a6d9ed8..3242dde 100644 --- a/cmd/dolmetschctld/dolmetschctld.go +++ b/cmd/dolmetschctld/dolmetschctld.go @@ -67,8 +67,8 @@ func main() { log.Printf("state machine successfully initialized!") // TODO: make this configurable - addLanguage(sm, "en", 0x20, 0x24) - addLanguage(sm, "de", 0x22, 0x25) + addLanguage(sm, "en", "auxin/01", "auxin/05") + addLanguage(sm, "de", "auxin/03", "auxin/06") sm.Start() defer sm.Shutdown() diff --git a/cmd/dolmetschctld/statemachine.go b/cmd/dolmetschctld/statemachine.go index 15f0e41..b6d46ba 100644 --- a/cmd/dolmetschctld/statemachine.go +++ b/cmd/dolmetschctld/statemachine.go @@ -178,12 +178,7 @@ func (sm *StateMachine) handleMixerEvent(ev mixer.Event) { // make sure that our state and the mixer are in sync func (sm *StateMachine) initMixer() { for _, mcs := range sm.languages { - sm.mixer.SetLevel(mcs.original.num, mixer.FaderLevel0db-1) - sm.mixer.SetLevel(mcs.original.num, mixer.FaderLevel0db) mcs.original.target.level = mixer.FaderLevel0db - - sm.mixer.SetLevel(mcs.interpreter.num, mixer.FaderLevelOff+1) - sm.mixer.SetLevel(mcs.interpreter.num, mixer.FaderLevelOff) mcs.interpreter.target.level = mixer.FaderLevelOff } sm.language = "" @@ -226,9 +221,9 @@ func calcNextLevel(target, current mixer.FaderLevel) mixer.FaderLevel { next := target if current != mixer.FaderLevelUnknown { if next > current { - next = current + 1 + next = current + 0.01 } else { - next = current - 1 + next = current - 0.01 } } return next |