add: default scope and error codes mapping
This commit is contained in:
parent
d64f6151d9
commit
fc23e4c2a5
|
@ -141,6 +141,12 @@ var errorsMap = map[error]int{
|
|||
OCRServiceConnectionError: 82,
|
||||
OCRResponseError: 83,
|
||||
OCRTextNotFoundError: 84,
|
||||
|
||||
CVEnvMissedError: 90,
|
||||
CVRequestError: 91,
|
||||
CVServiceConnectionError: 92,
|
||||
CVResponseError: 93,
|
||||
CVImageNotFoundError: 94,
|
||||
}
|
||||
|
||||
func IsErrorPredefined(err error) bool {
|
||||
|
|
|
@ -1 +1 @@
|
|||
v4.3.3.2306281303
|
||||
v4.3.3.2307131714
|
|
@ -613,6 +613,9 @@ func (dExt *DriverExt) DoAction(action MobileAction) error {
|
|||
}
|
||||
return fmt.Errorf("invalid %s params: %v", ACTION_TapByOCR, action.Params)
|
||||
case ACTION_TapByCV:
|
||||
if len(action.Scope) != 4 {
|
||||
action.Scope = []float64{0, 0, 1, 1}
|
||||
}
|
||||
if imagePath, ok := action.Params.(string); ok {
|
||||
return dExt.TapByCV(
|
||||
imagePath,
|
||||
|
|
Loading…
Reference in New Issue