DUBAI: fix percent negative

This commit is contained in:
Pakin 2025-04-23 14:28:49 +07:00
parent 776aa8df4a
commit 2801a06668
4 changed files with 45 additions and 5 deletions

View file

@ -376,6 +376,27 @@
; percent
If ShowCountDownAsPercent = 1 Then
DEBUGVAR InitCNT
If InitCNT = "" Then
Var InitCNT = BREW_CNT
DEBUGVAR "InitCNT Empty"
Else
If InitCNT = 0 Then
If BREW_CNT > 0 Then
Var InitCNT = BREW_CNT
DEBUGVAR "BREW_CNT Slow set"
Else
Var InitCNT = ShowCountDownBrewing
DEBUGVAR "BREW_CNT Still not set"
DEBUGVAR BREW_CNT
DEBUGVAR ShowCountDownBrewing
EndIf
EndIf
EndIf
Var XPercent = InitCNT - ShowCountDownBrewing
If ShowCountDownBrewing <= 5 Then
Var XPercent = 95
@ -390,7 +411,7 @@
DEBUGVAR XPercent
EndIf
If Timeout > 540 Then
SAVELOG "back_to_main from line > 217."

View file

@ -717,6 +717,25 @@
; percent
If ShowCountDownAsPercent = 1 Then
DEBUGVAR InitCNT
If InitCNT = "" Then
Var InitCNT = BREW_CNT
DEBUGVAR "InitCNT Empty"
Else
If InitCNT = 0 Then
If BREW_CNT > 0 Then
Var InitCNT = BREW_CNT
DEBUGVAR "BREW_CNT Slow set"
Else
Var InitCNT = ShowCountDownBrewing
DEBUGVAR "BREW_CNT Still not set"
DEBUGVAR BREW_CNT
DEBUGVAR ShowCountDownBrewing
EndIf
EndIf
EndIf
Var XPercent = InitCNT - ShowCountDownBrewing
If ShowCountDownBrewing <= 5 Then
Var XPercent = 95

View file

@ -216,7 +216,7 @@
EndIf
If CountryName = "UnitedArabEmirates Dubai" Then
Var brewing3ContiInter = CountryRootPath + "/xml/page_brewing3Conti.lxml"
Var brewing3ContiInter = CountryRootPath + "/xml/page_brewing3Conti.xml"
Open brewing3ContiInter
Else
@ -264,7 +264,7 @@
If New_Payment = 1 Then
TRY "/mnt/sdcard/coffeevending/taobin_project/xml/process/payment.ev"
EndIf
Open "ROOT/taobin_project/xml/page_brewing3.xml"
Else
Var Brew3Inter = CountryRootPath + "/xml/page_brewing3.lxml"
@ -302,11 +302,11 @@
Var LidState = "Invisible"
EndIf
DEBUGVAR CountryName
DEBUGVAR InternationalEnable
Var UserPressButton = "false"
SAVELOG "page_lid_straw.xml"