修改菜品识别逻辑

This commit is contained in:
mazengfei
2025-11-06 14:18:48 +08:00
parent cd883af92f
commit cc2fd2d743
2 changed files with 11 additions and 4 deletions
@@ -210,9 +210,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
Timber.d("registerDataChange weight = $weight")
presentation?.updateWeight(weight)
// if (weight <= 0.005) {//检测到秤上没有东西,重新启动识别菜品
// isRecognitionFood = true
// }
if (weight <= 0.005 && presentation?.mealPickupMode == 1) {//余量取餐,检测到秤上没有东西,重新启动识别菜品
isRecognitionFood = true
}
if (weight - lastWeight > 0.05 && isRecognitionFood) { // 大于50g
if (presentation?.mealPickupMode == 1) {
isRecognitionFood = false