添加灯操作
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.sw.dualscreen.presentation
|
||||
|
||||
import android.Manifest
|
||||
import android.R.attr.visibility
|
||||
import android.app.Presentation
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
@@ -36,6 +35,7 @@ import com.sw.dualscreen.model.response.UserNutritionData
|
||||
import com.sw.dualscreen.utils.Debouncer
|
||||
import com.sw.dualscreen.utils.GlideUtils
|
||||
import com.sw.dualscreen.viewmodel.UserViewModel
|
||||
import com.sw.plate.utils.LightManager
|
||||
import com.sw.plate.utils.ToastUtils
|
||||
import com.sw.plate.utils.arcface.ConfigUtil
|
||||
import com.sw.plate.utils.arcface.ErrorCodeUtil
|
||||
@@ -162,6 +162,8 @@ class SecondaryScreenPresentation(
|
||||
fun step1() {
|
||||
Timber.d("step1")
|
||||
currentStep = 1
|
||||
LightManager.closeGreenLight()
|
||||
LightManager.openRedLight()
|
||||
//回复上一次的设置
|
||||
// lastWeight = 0.0
|
||||
dinnerTypeInfo = null
|
||||
@@ -186,7 +188,8 @@ class SecondaryScreenPresentation(
|
||||
fun step2(foodInfo: FoodInfo) {
|
||||
Timber.d("step2")
|
||||
currentStep = 2
|
||||
|
||||
LightManager.openRedLight()
|
||||
LightManager.openGreenLight()
|
||||
dinnerTypeInfo = null
|
||||
userNutritionData = null
|
||||
recognitionWeight = 0.0
|
||||
@@ -233,6 +236,7 @@ class SecondaryScreenPresentation(
|
||||
*/
|
||||
fun step3() {
|
||||
Timber.d("step3")
|
||||
LightManager.closeRedLight()
|
||||
currentStep = 3
|
||||
stepChangeCallback(currentStep)
|
||||
if (currentFood == null) {
|
||||
|
||||
Reference in New Issue
Block a user