1717import com .firstbuild .androidapp .paragon .dataModel .RecipeInfo ;
1818import com .firstbuild .androidapp .paragon .dataModel .RecipeManager ;
1919import com .firstbuild .androidapp .paragon .dataModel .StageInfo ;
20+ import com .firstbuild .androidapp .productManager .ProductInfo ;
21+ import com .firstbuild .androidapp .productManager .ProductManager ;
2022import com .firstbuild .commonframework .bleManager .BleManager ;
2123import com .firstbuild .viewUtil .gridCircleView ;
2224
@@ -150,10 +152,10 @@ public void onClick(View view) {
150152 /**
151153 * Update cooking state, Off -> Heating -> Ready -> Cooking -> Done
152154 *
153- * @param state
154155 */
155- public void updateCookStatus (byte state ) {
156- Log .d (TAG , "updateCookStatus IN " + state );
156+ public void updateCookState () {
157+ byte state = ProductManager .getInstance ().getCurrent ().getErdCookState ();
158+ Log .d (TAG , "updateCookState IN " + state );
157159
158160 switch (state ) {
159161 case ParagonValues .COOK_STATE_OFF :
@@ -339,7 +341,7 @@ public void updateUiCurrentTemp() {
339341
340342 if (cookState == MULTI_STAGE_COOK_STATE .STATE_HEAT_COOL ) {
341343
342- int currentTemp = Math .round (attached . getCurrentTemp ());
344+ int currentTemp = Math .round (ProductManager . getInstance (). getCurrent (). getErdCurrentTemp ());
343345 int targetTep = stageInfo .getTemp ();
344346
345347 if (currentTemp < targetTep ){
@@ -365,9 +367,11 @@ public void updateUiCurrentTemp() {
365367 /**
366368 * Update UI current elapsed time. Elapsed time is increase from 0 until selected cook time.
367369 *
368- * @param elapsedTime ingeter value of elapsed time.
369370 */
370- public void updateUiElapsedTime (int elapsedTime ) {
371+ public void updateUiElapsedTime () {
372+ ProductInfo productInfo = ProductManager .getInstance ().getCurrent ();
373+ int elapsedTime = productInfo .getErdElapsedTime ();
374+
371375 Log .d (TAG , "updateUiElapsedTime :" + elapsedTime );
372376 StageInfo stageInfo = RecipeManager .getInstance ().getCurrentStage ();
373377
@@ -388,9 +392,9 @@ public void updateUiElapsedTime(int elapsedTime) {
388392
389393 /**
390394 * Udate new stage get from BLE master.
391- * @param newStage integer value of stage 1 - 5.
392395 */
393- public void updateCookStage (int newStage ) {
396+ public void updateCookStage () {
397+ int newStage = ProductManager .getInstance ().getCurrent ().getErdCookStage ();
394398 RecipeManager .getInstance ().setCurrentStage (newStage -1 );
395399
396400 attached .setTitle ("Stage " +newStage );
0 commit comments