GetDropStatus
Query the drop detection status.
Note: If the vending machine drop detection switch is not enabled, please reject the response.
Attribute | Type | Default Value | Description |
---|---|---|---|
addr | int | Slave address. | |
check | bool | Whether to enable drop detection. |
kotlin
// serial driver
private lateinit var driver: UBoard
fun your_method() {
// addr
val para = DSReplyPara(
addr
).apply {
driver.GetDropStatus(this)
}
if (!para.isOK) {
throw Exception("get drop status failed")
}
}
DSReplyPara Attribute Description
Attribute | Type | Default Value | Description |
---|---|---|---|
status | int | 0 - Drop detection not connected or blocked | |
1 - Drop detection is normal with unobstructed beam |