自采入库、新增物品、上传图片、全部收货接口调试,其它逻辑优化

This commit is contained in:
2025-10-29 20:08:12 +08:00
parent 0611005d04
commit 7930ba0cd1
24 changed files with 651 additions and 306 deletions
@@ -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 是否开启自动读取