From 44dff010d833b48bf4de3745479e91cb302fe849 Mon Sep 17 00:00:00 2001 From: Eli Yip Date: Wed, 28 May 2025 09:05:57 +0800 Subject: [PATCH] fix: l10 hand type config --- pkg/device/models/l10.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/device/models/l10.go b/pkg/device/models/l10.go index 1711d58..59839e7 100644 --- a/pkg/device/models/l10.go +++ b/pkg/device/models/l10.go @@ -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 }