自采入库、新增物品、上传图片、全部收货接口调试,其它逻辑优化
This commit is contained in:
@@ -32,6 +32,8 @@ object SensorScaleUtils {
|
||||
SensorScale.STATE_OVER_WEIGHT -> "量程溢出"
|
||||
else -> "未知"
|
||||
}
|
||||
|
||||
weightCallback?.invoke((value * 1000).toInt())
|
||||
//Timber.d("readWeight state = ${stateStr}, weight = $value")
|
||||
// 只使用稳定值
|
||||
// if (state == SensorScale.STATE_STABLE) {
|
||||
@@ -52,6 +54,11 @@ object SensorScaleUtils {
|
||||
})
|
||||
}
|
||||
|
||||
private var weightCallback: ((Int) -> Unit)? = null
|
||||
fun addWeightListener(callback: (Int) -> Unit) {
|
||||
weightCallback = callback
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启称重
|
||||
* @param autoScale 是否开启自动读取
|
||||
|
||||
Reference in New Issue
Block a user