Add hat to RuleType parser.
This commit is contained in:
parent
57a634b882
commit
42a1759961
2 changed files with 5 additions and 0 deletions
|
|
@ -54,6 +54,10 @@ func (dc *RuleConfig) UnmarshalYAML(unmarshal func(data interface{}) error) erro
|
||||||
config := RuleConfigModeSelect{}
|
config := RuleConfigModeSelect{}
|
||||||
err = unmarshal(&config)
|
err = unmarshal(&config)
|
||||||
dc.Config = config
|
dc.Config = config
|
||||||
|
case RuleTypeHat:
|
||||||
|
config := RuleConfigHat{}
|
||||||
|
err = unmarshal(&config)
|
||||||
|
dc.Config = config
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ const (
|
||||||
RuleTypeAxisToButton RuleType = "axis-to-button"
|
RuleTypeAxisToButton RuleType = "axis-to-button"
|
||||||
RuleTypeAxisToRelaxis RuleType = "axis-to-relaxis"
|
RuleTypeAxisToRelaxis RuleType = "axis-to-relaxis"
|
||||||
RuleTypeModeSelect RuleType = "mode-select"
|
RuleTypeModeSelect RuleType = "mode-select"
|
||||||
|
RuleTypeHat RuleType = "hat"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue