update adv
This commit is contained in:
commit
fbebcf0ee1
21 changed files with 6719 additions and 567 deletions
BIN
adv/taobin_adv_02.mp4
Executable file → Normal file
BIN
adv/taobin_adv_02.mp4
Executable file → Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
adv/taobin_adv_19.mp4
Executable file → Normal file
BIN
adv/taobin_adv_19.mp4
Executable file → Normal file
Binary file not shown.
BIN
adv/taobin_adv_menu2_02.mp4
Executable file → Normal file
BIN
adv/taobin_adv_menu2_02.mp4
Executable file → Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
adv/taobin_adv_menu2_19.mp4
Executable file → Normal file
BIN
adv/taobin_adv_menu2_19.mp4
Executable file → Normal file
Binary file not shown.
BIN
adv/taobin_adv_menu_02.mp4
Executable file → Normal file
BIN
adv/taobin_adv_menu_02.mp4
Executable file → Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
adv/taobin_adv_menu_19.mp4
Executable file → Normal file
BIN
adv/taobin_adv_menu_19.mp4
Executable file → Normal file
Binary file not shown.
|
|
@ -921,6 +921,52 @@
|
|||
EndIf
|
||||
EndIf
|
||||
|
||||
; Init read
|
||||
ReadProfile "ROOT/xmlprofile/main.json" "XMLProfile"
|
||||
DEBUGVAR XMLProfile
|
||||
|
||||
STRCONTAIN "y18IDCardLive" XMLProfile Y18IDCARDLIVE_ENABLE
|
||||
STRCONTAIN "y18IDCard" XMLProfile Y18IDCARD_ENABLE
|
||||
STRCONTAIN "SugarBreak" XMLProfile SugarBreakEnable
|
||||
STRCONTAIN "Discount50" XMLProfile Discount50
|
||||
|
||||
|
||||
DEBUGVAR EnableLiveness
|
||||
DEBUGVAR Only18
|
||||
DEBUGVAR NoSugarStepRight2
|
||||
DEBUGVAR HalfPrice
|
||||
If Y18IDCARDLIVE_ENABLE = "true" Then
|
||||
Var EnableLiveness = "true"
|
||||
Var Only18 = "true"
|
||||
Else
|
||||
Var EnableLiveness = "false"
|
||||
Var Only18 = "false"
|
||||
EndIf
|
||||
|
||||
If Y18IDCARD_ENABLE = "true" Then
|
||||
Var Only18 = "true"
|
||||
; MenuProfile
|
||||
Else
|
||||
Var Only18 = "false"
|
||||
EndIf
|
||||
|
||||
; Only get 1,2,3
|
||||
If SugarBreakEnable = "true" Then
|
||||
Var NoSugarStepRight2 = "true"
|
||||
Else
|
||||
Var NoSugarStepRight2 = "false"
|
||||
EndIf
|
||||
|
||||
If Discount50 = "true" Then
|
||||
Var HalfPrice = "true"
|
||||
Var InvokeDiscountCMD = "true"
|
||||
DEBUGVAR InvokeDiscountCMD
|
||||
__CMD "invoke-discount-50" "-" "-" "-"
|
||||
Else
|
||||
Var HalfPrice = "false"
|
||||
DEBUGVAR Discount50
|
||||
EndIf
|
||||
|
||||
Var NETCORE_LOST_COUNT_UP = 0
|
||||
|
||||
If RoadShow = "true" Then
|
||||
|
|
@ -965,6 +1011,48 @@
|
|||
|
||||
<Timeout> 1000 </Timeout>
|
||||
<EventTimeout>
|
||||
|
||||
; New profile: Y18, Y18+Live, NoSugarStepRight2
|
||||
|
||||
;DEBUGVAR 12-02-01-0021.Price
|
||||
;DEBUGVAR $12-02-01-0021.Price
|
||||
|
||||
DEBUGVAR XMLProfile
|
||||
; test
|
||||
; Var XMLProfile = "y18IDCard"
|
||||
; Var XMLProfile = "y18IDCardLive"
|
||||
; Var XMLProfile = "SugarBreak"
|
||||
|
||||
If XMLProfile = "" Then
|
||||
|
||||
; test action
|
||||
ReadProfile "ROOT/xmlprofile/main.json" "XMLProfile"
|
||||
DEBUGVAR XMLProfile
|
||||
|
||||
; Var XMLProfile = "Discount50"
|
||||
|
||||
EndIf
|
||||
|
||||
If Discount50 = "true" Then
|
||||
Var HalfPrice = "true"
|
||||
|
||||
If InvokeDiscountCMD = "" Then
|
||||
__CMD "invoke-discount-50" "-" "-" "-"
|
||||
Var InvokeDiscountCMD = "true"
|
||||
Else
|
||||
DEBUGVAR InvokeDiscountCMD
|
||||
EndIf
|
||||
|
||||
Else
|
||||
Var HalfPrice = "false"
|
||||
DEBUGVAR Discount50
|
||||
EndIf
|
||||
|
||||
DEBUGVAR EnableLiveness
|
||||
DEBUGVAR Only18
|
||||
DEBUGVAR NoSugarStepRight2
|
||||
DEBUGVAR HalfPrice
|
||||
|
||||
DEBUGVAR WebAppShow
|
||||
If IgnoreNetCore = "true" Then
|
||||
|
||||
|
|
@ -1036,7 +1124,7 @@
|
|||
DEBUGVAR NETCORE_EVENT_CNT_X
|
||||
EndIf
|
||||
|
||||
If NETCORE_EVENT_CNT_X > 300 Then
|
||||
If NETCORE_EVENT_CNT_X > 3600 Then
|
||||
Var stop_now = "true"
|
||||
Var stop_now_from_netcore_event = 1
|
||||
Var MachineErrorDetailAll = "Netcore Lost"
|
||||
|
|
@ -1112,11 +1200,16 @@
|
|||
Var CountDownPauseVideo = CountDownPauseVideo - 1
|
||||
|
||||
If CountDownPauseVideo = 1 Then
|
||||
|
||||
If InvokeDiscountCMD = "true" Then
|
||||
|
||||
If JXMLVersionInt > 451 Then
|
||||
TapScreen 30 638
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
If CountDownPauseVideo = 0 Then
|
||||
|
||||
Var NextPage = "ROOT/taobin_project/xml/page_back_to_main.xml"
|
||||
|
|
|
|||
720
xml/page_identity_verification.xml
Normal file
720
xml/page_identity_verification.xml
Normal file
|
|
@ -0,0 +1,720 @@
|
|||
<Popup>
|
||||
<Cache> "Enable" </Cache>
|
||||
<Width> 1080 </Width>
|
||||
<Height> 1920 </Height>
|
||||
<Background> "0xeae6e1" </Background>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventOpen>
|
||||
Var KornCropCountDown = 5
|
||||
Var KornIsShuttered = "false"
|
||||
Var KornOpenFaceCompareCountDown = 10
|
||||
Var KornIsCropped = "false"
|
||||
|
||||
; Note:
|
||||
; - Can't change roi and camera params in xml,
|
||||
; because the java code is not dynamic.
|
||||
; (It's a work-around method. (Maybe) Improve later.)
|
||||
|
||||
; Absolute positions
|
||||
Var KornRoiX = 440
|
||||
Var KornRoiY = 909
|
||||
Var KornRoiW = 200
|
||||
Var KornRoiH = 200
|
||||
Var KornRoiStepY = 40
|
||||
|
||||
; Re-calculate these values when either,
|
||||
; - CameraX size changes
|
||||
; - CameraX's hidden part size changes
|
||||
Var KornCamDisplayX = 285
|
||||
Var KornCamDisplayY = 781
|
||||
Var KornCamDisplayW = 500
|
||||
Var KornCamDisplayH = 680
|
||||
Var KornCamYHidden = 208
|
||||
|
||||
Var KornCamX = KornCamDisplayX
|
||||
Var KornCamY = KornCamDisplayY - KornCamYHidden
|
||||
Var KornCamW = KornCamDisplayW
|
||||
Var KornCamH = KornCamDisplayH + KornCamYHidden
|
||||
|
||||
Var KornRoiYMin = KornCamDisplayY
|
||||
Var KornRoiYRange = 220
|
||||
Var KornRoiYMax = KornCamDisplayY + KornRoiYRange
|
||||
|
||||
; To shrink the roi size, use this variable,
|
||||
; (value is between 0 and 100 (unit = percent))
|
||||
Var KornRoiPercentShrink = 30
|
||||
Var KornCamRoiDeltaX = KornRoiW * KornRoiPercentShrink
|
||||
Var KornCamRoiDeltaX = KornCamRoiDeltaX / 100
|
||||
Var KornCamRoiDeltaY = KornRoiH * KornRoiPercentShrink
|
||||
Var KornCamRoiDeltaY = KornCamRoiDeltaY / 100
|
||||
Var KornCamRoiW = KornRoiW - KornCamRoiDeltaX
|
||||
Var KornCamRoiH = KornRoiH - KornCamRoiDeltaY
|
||||
|
||||
; CameraX params
|
||||
Var KornCameraXOffsetX = 150
|
||||
Var KornCameraXX = KornCamDisplayX - KornCameraXOffsetX
|
||||
Var KornCameraXY = KornCamDisplayY
|
||||
Var KornCameraXW = 800
|
||||
Var KornCameraXH = 800
|
||||
; 800 = magic number
|
||||
|
||||
Var CamFlag = 0
|
||||
Var CamCount = 0
|
||||
Var Timeout = 0
|
||||
Var ShutterResult = "-"
|
||||
|
||||
;Var AdultFlag = 1
|
||||
If Only18 = "true" Then
|
||||
Var AdultFlag = 0
|
||||
EndIf
|
||||
DEBUGVAR AdultFlag
|
||||
|
||||
If AdultFlag = 1 Then
|
||||
|
||||
Var AdultFlag = 0
|
||||
|
||||
DEBUGVAR SystemDate
|
||||
Var sdate = ""
|
||||
Var sdate = SystemDate
|
||||
Var sdateday = ""
|
||||
Var sdatemonth = ""
|
||||
Var sdateyear = ""
|
||||
SPLIT sdate "/" 1 sdateday
|
||||
SPLIT sdate "/" 2 sdatemonth
|
||||
SPLIT sdate "/" 3 sdateyear
|
||||
INT sdateday
|
||||
INT sdatemonth
|
||||
INT sdateyear
|
||||
Var AdultState = "Enable"
|
||||
Var AdultState1 = "Enable"
|
||||
|
||||
Var countAdultS2 = 0
|
||||
Var AdultFlag2 = 1
|
||||
EndIf
|
||||
|
||||
DEBUGVAR AdultState1
|
||||
|
||||
If show_eng = "true" Then
|
||||
Var DirImage = "ROOT/taobin_project/image/page_payment_en/page_payment"
|
||||
Var DirImage2 = "ROOT/taobin_project/image/page_payment_cash_extend_en"
|
||||
Var page_doing_show_time_image = "ROOT/taobin_project/image/page_doing/img2.png"
|
||||
|
||||
Else
|
||||
Var DirImage = "ROOT/taobin_project/image/page_payment"
|
||||
Var DirImage2 = "ROOT/taobin_project/image/page_payment_cash_extend"
|
||||
Var page_doing_show_time_image = "ROOT/taobin_project/image/page_doing/img2.png"
|
||||
EndIf
|
||||
|
||||
|
||||
If CameraCount = 1 Then
|
||||
|
||||
EndIf
|
||||
|
||||
Var IDBirthdate = ""
|
||||
|
||||
Var LivenessResult = ""
|
||||
|
||||
Var CountDownDelayReadCardID = 3
|
||||
DEBUGVAR CameraCount
|
||||
;STOPCARDID
|
||||
Var LivenessShowString = ""
|
||||
|
||||
Var CameraStage = "Invisible"
|
||||
Var IDcardStage = "Enable"
|
||||
Var IDcardStageText = "Enable"
|
||||
Var load_gif_stage = "Invisible"
|
||||
Var IDcardTextStatus = "โปรดเสียบบัตรประชาชน \nเพื่อดำเนินการต่อ"
|
||||
|
||||
Var LivenessRestartCount = 0
|
||||
Var FailTrickCount = 0
|
||||
|
||||
Var FrameOfFaceStepMoveY = 40
|
||||
|
||||
Var FrameOfFaceXPosition = 440
|
||||
Var FrameOfFaceYPosition = 909
|
||||
Var FrameOfFaceCropImageYPosition = 230
|
||||
</EventOpen>
|
||||
|
||||
<EventActionOk>
|
||||
</EventActionOk>
|
||||
|
||||
<EventActionError>
|
||||
</EventActionError>
|
||||
|
||||
|
||||
<EventIDCard>
|
||||
|
||||
DEBUGVAR IDCardStatus
|
||||
DEBUGVAR IDCardReady
|
||||
DEBUGVAR IDCardData
|
||||
DEBUGVAR IDBirthdate
|
||||
DEBUGVAR IDFullNameEng
|
||||
|
||||
|
||||
If IDCardStatus = "OK" Then
|
||||
If IDCardReady = "OK" Then
|
||||
If IDCardData = "START" Then
|
||||
Var load_gif_stage = "Enable"
|
||||
Var IDcardStageText = "Invisible"
|
||||
|
||||
RefreshAll
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
If IDCardStatus = "OK" Then
|
||||
If IDCardReady = "OK" Then
|
||||
If IDCardData = "ERROR" Then
|
||||
Var load_gif_stage = "Invisible"
|
||||
Var IDcardStageText = "Enable"
|
||||
Var IDcardTextStatus = "อ่านบัตรไม่ได้อะ"
|
||||
Refresh
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
If IDCardStatus = "ERROR" Then
|
||||
Var load_gif_stage = "Invisible"
|
||||
Var IDcardStageText = "Enable"
|
||||
Var IDcardTextStatus = "อ่านบัตรไม่ได้เลยนะ"
|
||||
Refresh
|
||||
EndIf
|
||||
|
||||
If IDCardStatus = "OK" Then
|
||||
If IDCardReady = "OK" Then
|
||||
If IDCardData = "DONE" Then
|
||||
|
||||
;Var birthDate = IDBirthdate
|
||||
Var StrYear = ""
|
||||
Var StrMon = ""
|
||||
Var StrDay = ""
|
||||
|
||||
SUBSTRING IDBirthdate 0 4 StrYear
|
||||
SUBSTRING IDBirthdate 4 6 StrMon
|
||||
SUBSTRING IDBirthdate 6 8 StrDay
|
||||
|
||||
INT StrYear
|
||||
INT StrMon
|
||||
INT StrDay
|
||||
|
||||
Var Adult20 = 0
|
||||
|
||||
|
||||
DEBUGVAR StrYear
|
||||
DEBUGVAR StrMon
|
||||
DEBUGVAR StrDay
|
||||
|
||||
DEBUGVAR sdatemonth
|
||||
DEBUGVAR sdateday
|
||||
|
||||
Var sdateyear = sdateyear + 543
|
||||
Var AgeNumber = sdateyear - StrYear
|
||||
DEBUGVAR AgeNumber
|
||||
|
||||
If AgeNumber >= 20 Then
|
||||
|
||||
If AgeNumber = 20 Then
|
||||
If sdatemonth > StrMon Then
|
||||
Var Adult20 = 1
|
||||
Else
|
||||
If sdatemonth = StrMon Then
|
||||
If sdateday >= StrDay Then
|
||||
Var Adult20 = 1
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
Else
|
||||
Var Adult20 = 1
|
||||
EndIf
|
||||
|
||||
|
||||
Else
|
||||
|
||||
EndIf
|
||||
|
||||
|
||||
If Adult20 = 1 Then
|
||||
LivenessCommand "SetY" KornRoiY
|
||||
LivenessCommand "SetX" KornRoiX
|
||||
|
||||
LivenessCommand "start" 0
|
||||
|
||||
Var load_gif_stage = "Invisible"
|
||||
Var IDcardStageText = "Invisible"
|
||||
Var IDcardStage = "Invisible"
|
||||
Var IDcardTextStatus = "แสกนหน้า"
|
||||
Var CameraStage = "Enable"
|
||||
Refresh
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
|
||||
</EventIDCard>
|
||||
|
||||
|
||||
<Timeout> 1000 </Timeout>
|
||||
<EventTimeout>
|
||||
DEBUGVAR IDCardStatus
|
||||
DEBUGVAR IDCardReady
|
||||
DEBUGVAR IDCardData
|
||||
DEBUGVAR IDBirthdate
|
||||
DEBUGVAR CountDownDelayReadCardID
|
||||
DEBUGVAR ShutterResult
|
||||
DEBUGVAR IDCardState
|
||||
|
||||
Var KornCamRoiDeltaXTmp = KornCamRoiDeltaX / 2
|
||||
Var KornCamRoiX = KornRoiX + KornCamRoiDeltaXTmp
|
||||
Var KornCamRoiY = KornRoiY
|
||||
|
||||
|
||||
If IDBirthdate = "" Then
|
||||
Var CountDownDelayReadCardID = CountDownDelayReadCardID - 1
|
||||
If CountDownDelayReadCardID = 0 Then
|
||||
READCARDID
|
||||
Var CountDownDelayReadCardID = 600
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
DEBUGVAR Timeout
|
||||
Var Timeout = Timeout + 1
|
||||
|
||||
If Timeout > 120 Then
|
||||
Open "ROOT/taobin_project/xml/page_catalog2.xml"
|
||||
EndIf
|
||||
|
||||
;If ShutterResult = "ok" Then
|
||||
; Open "ROOT/taobin_project/xml/page_face_compare.xml"
|
||||
;EndIf
|
||||
|
||||
DEBUGVAR LivenessResult
|
||||
|
||||
If LivenessResult = "pass" Then
|
||||
|
||||
If KornCropCountDown > 0 Then
|
||||
DEBUGVAR KornCropCountDown
|
||||
Var KornCropCountDown = KornCropCountDown - 1
|
||||
|
||||
Var LivenessShowString = "Pass "
|
||||
Var load_gif_stage = "Enable"
|
||||
|
||||
If KornIsShuttered = "false" Then
|
||||
CameraCmd "usbfront" "shutter" "/mnt/sdcard/camera1.jpg"
|
||||
|
||||
Var KornShutter = "Shuttered"
|
||||
DEBUGVAR KornShutter
|
||||
|
||||
Var KornIsShuttered = "true"
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
If KornCropCountDown <= 0 Then
|
||||
|
||||
If KornIsCropped = "false" Then
|
||||
|
||||
CROP_IMAGE "/mnt/sdcard/camera1.jpg" "/mnt/sdcard/camera1_alter.jpg"
|
||||
|
||||
Var KornCrop = "Cropped"
|
||||
DEBUGVAR KornCrop
|
||||
|
||||
Var KornIsCropped = "true"
|
||||
EndIf
|
||||
|
||||
DEBUGVAR KornOpenFaceCompareCountDown
|
||||
Var KornOpenFaceCompareCountDown = KornOpenFaceCompareCountDown - 1
|
||||
|
||||
If KornOpenFaceCompareCountDown <= 0 Then
|
||||
Open "ROOT/taobin_project/xml/page_face_compare.xml"
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
If LivenessResult = "fail" Then
|
||||
Var LivenessRestartCount = LivenessRestartCount + 1
|
||||
If LivenessRestartCount = 2 Then
|
||||
Var LivenessRestartCount = 0
|
||||
LivenessCommand "stop" 0
|
||||
LivenessCommand "start" 0
|
||||
Var LivenessResult = "-"
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
If IDCardState = "PRESENT" Then
|
||||
If IDCardStatus = "ERROR" Then
|
||||
Var load_gif_stage = "Invisible"
|
||||
Var IDcardStageText = "Enable"
|
||||
Var IDcardTextStatus = "อ่านบัตรไม่ได้อะ"
|
||||
Refresh
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
DEBUGVAR LivenessFramePositionX
|
||||
DEBUGVAR LivenessFramePositionY
|
||||
|
||||
|
||||
Refresh
|
||||
TimerReset
|
||||
</EventTimeout>
|
||||
|
||||
|
||||
<Video>
|
||||
<X> 0 </X>
|
||||
<Y> 0 </Y>
|
||||
<Width> 1080</Width>
|
||||
<Height> 380 </Height>
|
||||
<Loop> "true" </Loop>
|
||||
<Filename> video_menu_0 </Filename>
|
||||
</Video>
|
||||
|
||||
|
||||
|
||||
|
||||
<Image>
|
||||
<X> 0 </X>
|
||||
<Y> 380 </Y>
|
||||
<State> "Enable" </State>
|
||||
<Filename> "ROOT/taobin_project/image/page_payment/alpha.png" </Filename>
|
||||
</Image>
|
||||
|
||||
<Image>
|
||||
<X> 123 </X>
|
||||
<Y> 598 </Y>
|
||||
<State> CameraStage </State>
|
||||
<Filename> "ROOT/taobin_project/image/liveness/bg2.png" </Filename>
|
||||
</Image>
|
||||
|
||||
|
||||
<Text>
|
||||
<X> 0 </X>
|
||||
<Y> 602 </Y>
|
||||
<Width> 1080</Width>
|
||||
<Align> Center </Align>
|
||||
<Size> 60 </Size>
|
||||
<Font> KanitMediumTTF </Font>
|
||||
<Color> 0xDE794E </Color>
|
||||
<State> CameraStage </State>
|
||||
<Value> LivenessShowString </Value>
|
||||
</Text>
|
||||
|
||||
|
||||
|
||||
; back
|
||||
<Button>
|
||||
<X> 356 </X>
|
||||
<Y> 1608 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/liveness/bn_cancel.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/liveness/bn_cancel.png" </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
SAVELOG "Liveness Result - Cancel"
|
||||
Open "ROOT/taobin_project/xml/page_catalog2.xml"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
|
||||
; arrow up
|
||||
<Button>
|
||||
<X> 20 </X>
|
||||
<Y> 888 </Y>
|
||||
<Width>180</Width>
|
||||
<Height>180</Height>
|
||||
<State> eval(
|
||||
If Only18 = "true" Then
|
||||
|
||||
If EnableLiveness = "true" Then
|
||||
Var return = "Enable"
|
||||
Else
|
||||
Var return = "Invisible"
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
) </State>
|
||||
<Filename> "ROOT/taobin_project/image/liveness/arrow_up.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/liveness/arrow_up.png" </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
SAVELOG "Allow up"
|
||||
|
||||
Var KornRoiYTmp = KornRoiY - KornRoiStepY
|
||||
If KornRoiYTmp > KornRoiYMin Then
|
||||
Var KornRoiY = KornRoiYTmp
|
||||
DEBUGVAR KornRoiY
|
||||
LivenessCommand "SetY" KornRoiY
|
||||
LivenessCommand "stop" 0
|
||||
LivenessCommand "start" 0
|
||||
EndIf
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
; arrow down
|
||||
<Button>
|
||||
<X> 20 </X>
|
||||
<Y> 1249 </Y>
|
||||
<Width>180</Width>
|
||||
<Height>180</Height>
|
||||
<State> eval(
|
||||
If Only18 = "true" Then
|
||||
|
||||
If EnableLiveness = "true" Then
|
||||
Var return = "Enable"
|
||||
Else
|
||||
Var return = "Invisible"
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
) </State>
|
||||
<Filename> "ROOT/taobin_project/image/liveness/arrow_down.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/liveness/arrow_down.png" </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
SAVELOG "Allow down"
|
||||
|
||||
Var KornRoiYTmp = KornRoiY + KornRoiStepY
|
||||
If KornRoiYTmp < KornRoiYMax Then
|
||||
Var KornRoiY = KornRoiYTmp
|
||||
DEBUGVAR KornRoiY
|
||||
LivenessCommand "SetY" KornRoiY
|
||||
LivenessCommand "stop" 0
|
||||
LivenessCommand "start" 0
|
||||
EndIf
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
|
||||
; arrow up
|
||||
<Button>
|
||||
<X> 892 </X>
|
||||
<Y> 888 </Y>
|
||||
<Width>180</Width>
|
||||
<Height>180</Height>
|
||||
<State> eval(
|
||||
If Only18 = "true" Then
|
||||
|
||||
If EnableLiveness = "true" Then
|
||||
Var return = "Enable"
|
||||
Else
|
||||
Var return = "Invisible"
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
) </State>
|
||||
<Filename> "ROOT/taobin_project/image/liveness/arrow_up.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/liveness/arrow_up.png" </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
SAVELOG "Allow up"
|
||||
|
||||
Var KornRoiYTmp = KornRoiY - KornRoiStepY
|
||||
If KornRoiYTmp > KornRoiYMin Then
|
||||
Var KornRoiY = KornRoiYTmp
|
||||
DEBUGVAR KornRoiY
|
||||
LivenessCommand "SetY" KornRoiY
|
||||
LivenessCommand "stop" 0
|
||||
LivenessCommand "start" 0
|
||||
EndIf
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
; arrow down
|
||||
<Button>
|
||||
<X> 892 </X>
|
||||
<Y> 1249 </Y>
|
||||
<Width>180</Width>
|
||||
<Height>180</Height>
|
||||
<State> eval(
|
||||
If Only18 = "true" Then
|
||||
|
||||
If EnableLiveness = "true" Then
|
||||
Var return = "Enable"
|
||||
Else
|
||||
Var return = "Invisible"
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
) </State>
|
||||
<Filename> "ROOT/taobin_project/image/liveness/arrow_down.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/liveness/arrow_down.png" </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
SAVELOG "Allow down"
|
||||
|
||||
;Var KornRoiYTmp = KornRoiY + KornRoiStepY
|
||||
;If KornRoiYTmp < KornRoiYMax Then
|
||||
; Var KornRoiY = KornRoiYTmp
|
||||
; DEBUGVAR KornRoiY
|
||||
; LivenessCommand "SetY" KornRoiY
|
||||
; LivenessCommand "stop" 0
|
||||
; LivenessCommand "start" 0
|
||||
;EndIf
|
||||
Var LivenessResult = "pass"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
|
||||
|
||||
<Image>
|
||||
<X> 196 </X>
|
||||
<Y> 737 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/liveness/bg_21.png" </Filename>
|
||||
</Image>
|
||||
|
||||
<CameraX>
|
||||
<X> KornCameraXX </X>
|
||||
;140
|
||||
<Y> KornCameraXY </Y>
|
||||
;781
|
||||
<Name>"usbfront"</Name>
|
||||
<Width> KornCameraXW </Width>
|
||||
;800
|
||||
; Display width is about 500, (full width is about the same)
|
||||
<Height> KornCameraXH </Height>
|
||||
;800
|
||||
; Display height is about 680, (full height = 888)
|
||||
<State> eval(
|
||||
If Only18 = "true" Then
|
||||
|
||||
If EnableLiveness = "true" Then
|
||||
Var return = "Enable"
|
||||
Else
|
||||
Var return = "Invisible"
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
) </State>
|
||||
<LivenessParameterWhenOK> "FileName=/mnt/sdcard/camera1_alter.jpg" </LivenessParameterWhenOK>
|
||||
</CameraX>
|
||||
|
||||
|
||||
|
||||
<Image>
|
||||
<X> KornCamRoiX </X>
|
||||
;FrameOfFaceXPosition
|
||||
<Y> KornCamRoiY </Y>
|
||||
;FrameOfFaceYPosition
|
||||
<Width> KornCamRoiW </Width>
|
||||
;200
|
||||
<Height> KornCamRoiH </Height>
|
||||
;200
|
||||
<State> CameraStage </State>
|
||||
<Filename> "ROOT/taobin_project/image/liveness/bg3.png" </Filename>
|
||||
</Image>
|
||||
|
||||
|
||||
<Image>
|
||||
<X> 196 </X>
|
||||
<Y> 737 </Y>
|
||||
<State> IDcardStage </State>
|
||||
<Filename> "ROOT/taobin_project/image/liveness/bg_21.png" </Filename>
|
||||
</Image>
|
||||
|
||||
<Text>
|
||||
<X> 0 </X>
|
||||
<Y> 1050 </Y>
|
||||
<State> IDcardStageText </State>
|
||||
<Width> 1080</Width>
|
||||
<Align> Center </Align>
|
||||
<Size> 56 </Size>
|
||||
<Font> KanitMediumTTF </Font>
|
||||
<Color> 0xDE794E </Color>
|
||||
<Value> IDcardTextStatus </Value>
|
||||
</Text>
|
||||
|
||||
|
||||
|
||||
<GIF>
|
||||
<X> 440 </X>
|
||||
<Y> 988 </Y>
|
||||
<State> load_gif_stage </State>
|
||||
<Filename> "ROOT/taobin_project/image/page_payment/loading.gif"</Filename>
|
||||
</GIF>
|
||||
|
||||
|
||||
<EventCamera>
|
||||
DEBUGVAR BugFlag
|
||||
If BugFlag = 0 Then
|
||||
Var BugFlag = 1
|
||||
EndIf
|
||||
</EventCamera>
|
||||
|
||||
<EventLivenessState>
|
||||
DEBUGVAR LivenessStateString
|
||||
DEBUGVAR LivenessStateForPlaySound
|
||||
|
||||
Var SoundWavFileName = "/mnt/sdcard/coffeevending/taobin_project/liveness/sound/" + LivenessStateForPlaySound
|
||||
Var SoundWavFileName = SoundWavFileName + ".wav"
|
||||
|
||||
DEBUGVAR SoundWavFileName
|
||||
DEBUGVAR PrevSoundWavFileName
|
||||
|
||||
|
||||
If PrevSoundWavFileName = SoundWavFileName Then
|
||||
|
||||
Else
|
||||
Play SoundWavFileName
|
||||
Var PrevSoundWavFileName = SoundWavFileName
|
||||
EndIf
|
||||
|
||||
If LivenessResult = "pass" Then
|
||||
DEBUGVAR AdultFlag
|
||||
DEBUGVAR AdultState1
|
||||
Open "ROOT/taobin_project/xml/page_payment.xml"
|
||||
Else
|
||||
Var LivenessShowString = LivenessStateString
|
||||
EndIf
|
||||
Refresh
|
||||
</EventLivenessState>
|
||||
|
||||
<EventLivenessResult>
|
||||
DEBUGVAR LivenessResult
|
||||
If LivenessResult = "pass" Then
|
||||
|
||||
Var strlog_liveness = "Liveness Result - pass " + FailTrickCount
|
||||
|
||||
SAVELOG strlog_liveness
|
||||
Else
|
||||
Var FailTrickCount = FailTrickCount + 1
|
||||
Var strlog_liveness = "Liveness Result - fail " + FailTrickCount
|
||||
SAVELOG strlog_liveness
|
||||
EndIf
|
||||
</EventLivenessResult>
|
||||
|
||||
<EventUnitTest1>
|
||||
Var IDCardStatus = "OK"
|
||||
Var IDCardReady = "OK"
|
||||
Var IDCardData = "START"
|
||||
EventEvaluate "EventIDCard"
|
||||
</EventUnitTest1>
|
||||
|
||||
<EventUnitTest2>
|
||||
Var IDBirthdate = 25271014
|
||||
Var IDCardStatus = "OK"
|
||||
Var IDCardReady = "OK"
|
||||
Var IDCardData = "DONE"
|
||||
EventEvaluate "EventIDCard"
|
||||
</EventUnitTest2>
|
||||
<EventUnitTest3>
|
||||
Var LivenessResult = "pass"
|
||||
EventEvaluate "EventLivenessState"
|
||||
</EventUnitTest3>
|
||||
|
||||
<EventUnitTest4>
|
||||
Var IDCardState = "PRESENT"
|
||||
Var IDCardStatus = "ERROR"
|
||||
Var IDCardReady = "ERROR"
|
||||
Var IDCardData = "ERROR"
|
||||
</EventUnitTest4>
|
||||
|
||||
</Popup>
|
||||
|
||||
|
||||
|
|
@ -33,6 +33,10 @@
|
|||
|
||||
Var AdultFlag = 0
|
||||
|
||||
If Only18 = "true" Then
|
||||
DEBUGVAR AdultState1
|
||||
DEBUGVAR AdultFlag
|
||||
Else
|
||||
If SelectDrink = "12-05-02-0028" Then
|
||||
Var AdultFlag = 1
|
||||
EndIf
|
||||
|
|
@ -54,6 +58,7 @@
|
|||
If SelectDrink = "12-05-03-0027" Then
|
||||
Var AdultFlag = 1
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
If CustomerFilterEnable = "YES" Then
|
||||
Var AdultFlag = 1
|
||||
|
|
@ -474,6 +479,11 @@
|
|||
|
||||
EndIf
|
||||
|
||||
|
||||
If Only18 = "true" Then
|
||||
Var AdultFlag = 0
|
||||
EndIf
|
||||
|
||||
Open "ROOT/taobin_project/xml/page_payment_cash.xml"
|
||||
EndIf
|
||||
EndIf
|
||||
|
|
|
|||
|
|
@ -51,6 +51,19 @@
|
|||
Open "ROOT/taobin_project/xml/page_topping_select8.xml"
|
||||
EndIf
|
||||
|
||||
If Only18 = "true" Then
|
||||
Open "ROOT/taobin_project/xml/page_topping_select7_copy.xml"
|
||||
Else
|
||||
If NoSugarStepRight2 = "true" Then
|
||||
Open "ROOT/taobin_project/xml/page_topping_select7_copy.xml"
|
||||
Else
|
||||
If HalfPrice = "true" Then
|
||||
Open "ROOT/taobin_project/xml/page_topping_select7_copy.xml"
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
If BoxID = 200001 Then
|
||||
;Open "ROOT/taobin_project/xml/page_topping_select8.xml"
|
||||
EndIf
|
||||
|
|
|
|||
5213
xml/page_topping_select7_copy.xml
Normal file
5213
xml/page_topping_select7_copy.xml
Normal file
File diff suppressed because it is too large
Load diff
30
xmlprofile/idea.txt
Normal file
30
xmlprofile/idea.txt
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Note
|
||||
|
||||
XMLProfile v1
|
||||
|
||||
```
|
||||
adb shell
|
||||
|
||||
mkdir /sdcard/coffeevending/xmlprofile
|
||||
|
||||
adb push ./xmlprofile/sample_design1.json /sdcard/coffeevending/xmlprofile/main.json
|
||||
```
|
||||
|
||||
- JSON structure
|
||||
|
||||
** modifiers ** not used yet!
|
||||
|
||||
```
|
||||
{
|
||||
"ProfileName":{
|
||||
"enable": "true | false",
|
||||
"except": [
|
||||
"BoxID that this profile cannot apply to"
|
||||
],
|
||||
"modifiers": [
|
||||
"apply_to=( all_menus | restricted_menus | ... )", // Work In Progress, this will apply the profile to the following options only.
|
||||
"# This is comment"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
40
xmlprofile/sample_design1.json
Normal file
40
xmlprofile/sample_design1.json
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"SugarBreak":{
|
||||
"enable": true,
|
||||
"except": [
|
||||
|
||||
],
|
||||
"modifiers": [
|
||||
"apply_to=all_menus"
|
||||
]
|
||||
},
|
||||
"Discount50":{
|
||||
"enable": true,
|
||||
"except": [
|
||||
200000,
|
||||
200001
|
||||
],
|
||||
"modifiers": [
|
||||
"apply_to=all_menus"
|
||||
]
|
||||
},
|
||||
"y18IDCard":{
|
||||
"enable": true,
|
||||
"except": [
|
||||
|
||||
],
|
||||
"modifiers": [
|
||||
"apply_to=restricted_menus"
|
||||
]
|
||||
},
|
||||
"y18IDCardLive":{
|
||||
"enable": false,
|
||||
"except": [
|
||||
|
||||
],
|
||||
"modifiers": [
|
||||
"apply_to=restricted_menus",
|
||||
"enable_feature=liveness # This is comment"
|
||||
]
|
||||
}
|
||||
}
|
||||
33
xmlprofile/y18IDCard.json
Normal file
33
xmlprofile/y18IDCard.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"Name": "y18IDCard Profile",
|
||||
"content": [
|
||||
{
|
||||
"productCode":"12-02-01-0017",
|
||||
"enable": true
|
||||
},
|
||||
{
|
||||
"productCode":"12-05-02-0027",
|
||||
"enable": true
|
||||
},
|
||||
{
|
||||
"productCode":"12-05-03-0027",
|
||||
"enable": true
|
||||
},
|
||||
{
|
||||
"productCode":"12-05-02-0028",
|
||||
"enable": true
|
||||
},
|
||||
{
|
||||
"productCode":"12-05-03-0028",
|
||||
"enable": true
|
||||
},
|
||||
{
|
||||
"productCode":"12-05-02-0029",
|
||||
"enable": true
|
||||
},
|
||||
{
|
||||
"productCode":"12-05-03-0029",
|
||||
"enable": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue