Эх сурвалжийг харах

2022-04-07 / ct_chen

Actions:
1. Webservice add Credit Card for Noodeo on system page

Files:
1.
ct_chen 3 жил өмнө
parent
commit
301517660c

+ 1 - 1
EVSE/Projects/define.h

@@ -737,7 +737,7 @@ struct DispenserModule
     unsigned char   RfidCardNumEndian;          //0: little endian,  1: big endian
     unsigned char   isAPP;                      //for AuthorisationMode=0; 0:false, 1:true
     unsigned char   isQRCode;                   //for AuthorisationMode=0; 0:false, 1:true
-    unsigned char   isRFID;                     //for AuthorisationMode=0; 0:false, 1:true
+    unsigned char   isRFID;                     //for AuthorisationMode=0; 0:false, 1:true; for Noodoe Credit Card +2^1:true
     unsigned char   QRCodeMadeMode;             //for isQRCode=1 ; 0: default	1:customized
     unsigned char   QRCodeContent[128];         //for QRCodeMadeMode=1
 

+ 11 - 3
EVSE/rootfs/var/www/set_system.php

@@ -210,8 +210,13 @@ img {
 											<input type="checkbox" id="isQRCode" name="isQRCode" <?php echo $obj->{'isQRCode'}==1?"checked":"";?> onclick="isQRCode_clicked()">
 											QR Code</label>
 											<label id="isRFIDLabel">
-											<input type="checkbox" id="isRFID" name="isRFID" <?php echo $obj->{'isRFID'}==1?"checked":"";?> onclick="isRFID_clicked()">
+											<input type="checkbox" id="isRFID" name="isRFID" <?php echo $obj->{'isRFID'}%2==1?"checked":"";?> onclick="isRFID_clicked()">
 											RFID</label>
+<?php if(substr($ModelName,12,1)=="N"){?>
+											<label id="isCreditCardLabel">
+											<input type="checkbox" id="isCreditCard" name="isCreditCard" <?php echo $obj->{'isRFID'}>1?"checked":"";?>>
+											Credit Card</label>
+<?php } ?>
 										</div>
 										<div class="form-group" id="QRCodeMadeModeDiv">
 											<label>QR Code Made Mode</label>
@@ -445,7 +450,10 @@ img {
 			// 發送 Ajax 查詢請求並處理
 			var request = new XMLHttpRequest();
 			request.open("POST", "set_system_action.php");
-
+			var isRFID= (document.getElementById("isRFID").checked?1:0);
+			if(document.getElementById("ModelName").value.substr(12,1) == "N"){
+				isRFID=parseInt(document.getElementById("isRFID").checked?1:0)+parseInt(document.getElementById("isCreditCard").checked?2:0);
+			}
 			// POST 參數須使用 send() 發送
 			var data =  "SystemId=" + document.getElementById("SystemId").value+
 						"&SystemDateTime=" + document.getElementById("SystemDateTime").value+
@@ -454,7 +462,7 @@ img {
 						"&AuthorisationMode=" + document.getElementById("AuthorisationMode").value+
 						"&isAPP=" + (document.getElementById("isAPP").checked?1:0)+
 						"&isQRCode=" + (document.getElementById("isQRCode").checked?1:0)+
-						"&isRFID=" + (document.getElementById("isRFID").checked?1:0)+
+						"&isRFID=" + isRFID+
 						"&isAuthrizeByEVCCID=" + (document.getElementById("isAuthrizeByEVCCID").checked?1:0)+
 						"&QRCodeMadeMode=" + document.getElementById("QRCodeMadeMode").value+
 						"&QRCodeContent=" + document.getElementById("QRCodeContent").value+

+ 0 - 1
board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/lib/.crc-ccitt.ko.cmd

@@ -1 +0,0 @@
-cmd_lib/crc-ccitt.ko := /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld -EL -r  -T ./scripts/module-common.lds --build-id  -o lib/crc-ccitt.ko lib/crc-ccitt.o lib/crc-ccitt.mod.o ;  true

+ 0 - 1
board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/lib/.crc-itu-t.ko.cmd

@@ -1 +0,0 @@
-cmd_lib/crc-itu-t.ko := /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld -EL -r  -T ./scripts/module-common.lds --build-id  -o lib/crc-itu-t.ko lib/crc-itu-t.o lib/crc-itu-t.mod.o ;  true