@dobot-plus/template 1.3.8 → 1.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dobot/http/http.ts +4 -3
- package/lua/control.lua +1 -0
- package/lua/utils/modbus.lua +2 -0
- package/package.json +1 -1
package/.dobot/http/http.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios'
|
|
1
2
|
import { request } from './axios'
|
|
2
3
|
|
|
3
4
|
export const demoMethod1 = (data: any) => {
|
|
4
5
|
return request({
|
|
5
6
|
url: 'demoMethod1',
|
|
6
7
|
data: [{ ...data }]
|
|
7
|
-
})
|
|
8
|
+
}) as Promise<AxiosResponse<[{ status: boolean; data: any }]>>
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export const demoMethod2 = (data: any) => {
|
|
11
12
|
return request({
|
|
12
13
|
url: 'demoMethod2',
|
|
13
14
|
data: [{ ...data }]
|
|
14
|
-
})
|
|
15
|
+
}) as Promise<AxiosResponse<[{ status: boolean; data: any }]>>
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export const demoMethod3 = (data: any) => {
|
|
18
19
|
return request({
|
|
19
20
|
url: 'demoMethod3',
|
|
20
21
|
data: [{ ...data }]
|
|
21
|
-
})
|
|
22
|
+
}) as Promise<AxiosResponse<[{ status: boolean; data: any }]>>
|
|
22
23
|
}
|
package/lua/control.lua
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
--- @module $PLUGIN_NAME$
|
|
2
2
|
--- @description This is the control module for the plugin.
|
|
3
3
|
--- This module contains the main control functions that will be called by the plugin's main logic.
|
|
4
|
+
--- In this module, the shift operation of binary data is prohibited to use external modules such as bit32, and must use Lua's native shift operator for shift operations.
|
|
4
5
|
|
|
5
6
|
local $PLUGIN_NAME$ = {}
|
|
6
7
|
|
package/lua/utils/modbus.lua
CHANGED