fix: l10 hand type config

This commit is contained in:
Eli Yip 2025-05-28 09:05:57 +08:00
parent 9c2d3c2c5e
commit 44dff010d8
No known key found for this signature in database
GPG Key ID: C98B69D4CF7D7EC5

View File

@ -40,8 +40,9 @@ func NewL10Hand(config map[string]any) (device.Device, error) {
canInterface = "can0" // 默认接口
}
handType, ok := config["hand_type"].(define.HandType)
if !ok {
handTypeStr, ok := config["hand_type"].(string)
handType := define.HAND_TYPE_RIGHT // 默认右手
if ok && handTypeStr == "left" {
handType = define.HAND_TYPE_LEFT
}