-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshims.d.ts
192 lines (164 loc) · 6.32 KB
/
shims.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
// Auto-generated. Do not edit.
//% color="#ff6600" weight=50 icon="\uf110"
declare namespace muvision {
/**
* Initialize MU.
*/
//% blockId=mu3_begin block="initialize%id|port%port"
//% group="Settings" shim=muvision::begin
function begin(id: MuId, port: MuVsMode): void;
/**
* Reset MU.
*/
//% blockId=mu3_set_default block="%id|restore default settings"
//% group="Settings" shim=muvision::setDefault
function setDefault(id: MuId): void;
/**
* MU vision begin.
*/
//% blockId=mu3_vision_begin block="%id|%enable|algorithm%type"
//% group="Settings" shim=muvision::visionBegin
function visionBegin(id: MuId, status: MuStatus, type: MuVsMessageVisionType): void;
/**
* set led color.
* @param id MU id
* @param led led type.
* @param detected_color led color while sensor detected target.
* @param undetected_color led color while sensor undetected target.
*/
//% blockId=mu3_led_set_color block="%id|LED %led|when detected %detected_color|when undetected %undetected_color"
//% weight=200 inlineInputMode=inline
//% group="Settings" advanced=true shim=muvision::ledSetColor
function ledSetColor(id: MuId, led: MuVsLed, detected_color: MuVsLedColor, undetected_color: MuVsLedColor): void;
/**
* set vision level.
* @param id MU id
* @param type vision type
* @param level vision level
*/
//% blockId=mu3_vision_set_level block="%id|algorithm%VISION_TYPE|Level%level"
//% group="Settings" advanced=true shim=muvision::visionSetLevel
function visionSetLevel(id: MuId, type: MuVsMessageVisionType, level: MuVsVisionLevel): void;
/**
* set camera zoom.
* @param id MU id
* @param zoom zoom value.
*/
//% blockId=mu3_camera_set_zoom block="%id|digital zoom%level"
//% group="Settings" advanced=true shim=muvision::cameraSetZoom
function cameraSetZoom(id: MuId, zoom: MuVsCameraZoom): void;
/**
* set camera white balance.
* @param id MU id
* @param wb white balance type.
*/
//% blockId=mu3_camera_set_awb block="%id|white balance%wb"
//% group="Settings" advanced=true shim=muvision::cameraSetAwb
function cameraSetAwb(id: MuId, wb: MuVsCameraWhiteBalance): void;
/**
* set camera FPS.
* @param id MU id
* @param on FPS type.
*/
//% blockId=mu3_camera_set_fps block="%id|high FPS mode$on"
//% on.shadow="toggleOnOff" on.defl="true"
//% group="Settings" advanced=true on.defl=1 shim=muvision::cameraSetFPS
function cameraSetFPS(id: MuId, on?: boolean): void;
/**
* Enable/Disable light sensor function,gesture detect can not used with other functions.
* @param id MU id
* @param status enable/disable function
* @param[in] ls_type Function type
*/
//% blockId=MU3LsBegin block="%id|light sensor|%status|%ls_type"
//% group="Light Sensor" shim=muvision::lsBegin
function lsBegin(id: MuId, status: MuStatus, ls_type: MuLsType): void;
/**
* Light snesor set sensitivity.
* @param id MU id
* @param sensitivity sensitivity
*/
//% blockId=MU3LsSetSensitivity block="%id|light sensor|set sensitivity%sensitivity"
//% group="Light Sensor" shim=muvision::lsSetSensitivity
function lsSetSensitivity(id: MuId, sensitivity: MuVsLsSensitivity): void;
/**
* @brief Read proximity data.
* @param id MU id
* @retval proximity data, 0~255.
*/
//% blockId=MU3LsReadProximity block="%id|light sensor|read proximity"
//% group="Light Sensor" shim=muvision::lsReadProximity
function lsReadProximity(id: MuId): uint8;
/**
* @brief Read ambient light sensor data.
* @param id MU id
* @retval ambient light sensor data, 0~65536.
*/
//% blockId=MU3LsReadAmbientLight block="%id|light sensor|read ambient light"
//% group="Light Sensor" shim=muvision::lsReadAmbientLight
function lsReadAmbientLight(id: MuId): uint16;
/**
* get vision result data, this function will update vision result automatically.
* @param id MU id
* @param vision_type: vision type.
* @param object_inf: object information
*/
//% blockId=mu3_get_value shim=muvision::getValue
function getValue(id: MuId, vision_type: MuVsMessageVisionType, object_inf: MuVsObjectInf): int32;
/**
* @brief write vision parameter.
* @param id MU id
* @param vision_type vision type.
* @param object_inf object information
* @param value value
*/
//% blockId=mu3_write shim=muvision::write
function write(id: MuId, vision_type: MuVsMessageVisionType, object_inf: MuVsObjectInf, value: int32): void;
/**
* @brief Read gesture sensor data.
* @retval Gesture witch MU detected.
*/
//% blockId=mu3_ls_read_gesture shim=muvision::lsReadGesture
function lsReadGesture(id: MuId): MuVsLsGesture;
}
//% color="#11ACEF" icon="\uf1eb"
declare namespace muvisionAT {
/**
* Read SIP
*/
//% blockId=mu3_at_wifi_sip block="MU|read SIP"
//% group="MUVisionSensor3_AT" shim=muvisionAT::wifiSIP
function wifiSIP(): string;
/**
* Read CIP
*/
//% blockId=mu3_at_wifi_cip block="MU|read CIP"
//% group="MUVisionSensor3_AT" shim=muvisionAT::wifiCIP
function wifiCIP(): string;
/**
* MU AT wifi set
*/
//% blockId=mu3_at_wifi_set block="MU|WiFi set|ssid|%ssid|password|%password|apmode|%apmode"
//% group="MUVisionSensor3_AT" shim=muvisionAT::wifiSet
function wifiSet(ssid: string, password: string, apmode: MuAtMode): void;
/**
* MU AT wifi connect, return `true`=success
*/
//% blockId=mu3_at_wifi_con block="MU|WiFi connect|%status"
//% status.shadow="toggleOnOff" status.defl="true"
//% group="MUVisionSensor3_AT" status.defl=1 shim=muvisionAT::wifiCon
function wifiCon(status?: boolean): boolean;
/**
* MU AT wifi set target IP&port
*/
//% blockId=mu3_at_wifi_udp block="MU|WiFi set target IP|%ip|port|%port"
//% group="MUVisionSensor3_AT" shim=muvisionAT::wifiUDP
function wifiUDP(ip: string, port: string): void;
/**
* MU AT wifi read data
*/
//% blockId=mu3_at_wifi_read block="MU|WiFi read"
//% group="MUVisionSensor3_AT" shim=muvisionAT::wifiRead
function wifiRead(): int32;
}
// Auto-generated. Do not edit. Really.