Pārlūkot izejas kodu

Merge branch 'AW-Regular' of https://git.phihong.com.tw:30000/System_Integration/CSU3_AM335x into AW-Regular

8009 3 gadi atpakaļ
vecāks
revīzija
34b6ab4e99

+ 51 - 0
EVSE/Modularization/WebService.c

@@ -2492,6 +2492,23 @@ int main(int argc, char *argv[]) {
 			json_object_object_add(ChargingInfo1,"SystemStatus",SystemStatus[0]);
 			json_object_object_add(ChargingInfo1,"EvBatterytargetCurrent",EvBatterytargetCurrent[0]);
 			json_object_object_add(ChargingInfo1,"PowerConsumption",PowerConsumption[0]);
+			if(strcmp(IsDO, "AX") == 0){
+				json_object_object_add(ChargingInfo1,"isCalibratedVaGain",isCalibratedVaGain[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedVbGain",isCalibratedVbGain[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedVcGain",isCalibratedVcGain[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedVaOffset",isCalibratedVaOffset[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedVbOffset",isCalibratedVbOffset[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedVcOffset",isCalibratedVcOffset[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedCaGain",isCalibratedCaGain[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedCbGain",isCalibratedCbGain[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedCcGain",isCalibratedCcGain[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedCaOffset",isCalibratedCaOffset[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedCbOffset",isCalibratedCbOffset[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedCcOffset",isCalibratedCcOffset[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedPa",isCalibratedPa[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedPb",isCalibratedPb[0]);
+				json_object_object_add(ChargingInfo1,"isCalibratedPc",isCalibratedPc[0]);
+			}
 			json_object_object_add(jobj2,"ChargingInfo1",ChargingInfo1);
 		}
 		if(connectorType2 != 0){
@@ -2513,6 +2530,23 @@ int main(int argc, char *argv[]) {
 			json_object_object_add(ChargingInfo2,"SystemStatus",SystemStatus[1]);
 			json_object_object_add(ChargingInfo2,"EvBatterytargetCurrent",EvBatterytargetCurrent[1]);
 			json_object_object_add(ChargingInfo2,"PowerConsumption",PowerConsumption[1]);
+			if(strcmp(IsDO, "AX") == 0){
+				json_object_object_add(ChargingInfo2,"isCalibratedVaGain",isCalibratedVaGain[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedVbGain",isCalibratedVbGain[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedVcGain",isCalibratedVcGain[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedVaOffset",isCalibratedVaOffset[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedVbOffset",isCalibratedVbOffset[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedVcOffset",isCalibratedVcOffset[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedCaGain",isCalibratedCaGain[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedCbGain",isCalibratedCbGain[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedCcGain",isCalibratedCcGain[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedCaOffset",isCalibratedCaOffset[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedCbOffset",isCalibratedCbOffset[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedCcOffset",isCalibratedCcOffset[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedPa",isCalibratedPa[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedPb",isCalibratedPb[1]);
+				json_object_object_add(ChargingInfo2,"isCalibratedPc",isCalibratedPc[1]);
+			}
 			json_object_object_add(jobj2,"ChargingInfo2",ChargingInfo2);
 		}
 		if(connectorType3 != 0){
@@ -2534,6 +2568,23 @@ int main(int argc, char *argv[]) {
 			json_object_object_add(ChargingInfo3,"SystemStatus",SystemStatus[2]);
 			json_object_object_add(ChargingInfo3,"EvBatterytargetCurrent",EvBatterytargetCurrent[2]);
 			json_object_object_add(ChargingInfo3,"PowerConsumption",PowerConsumption[2]);
+			if(strcmp(IsDO, "AX") == 0){
+				json_object_object_add(ChargingInfo3,"isCalibratedVaGain",isCalibratedVaGain[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedVbGain",isCalibratedVbGain[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedVcGain",isCalibratedVcGain[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedVaOffset",isCalibratedVaOffset[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedVbOffset",isCalibratedVbOffset[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedVcOffset",isCalibratedVcOffset[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedCaGain",isCalibratedCaGain[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedCbGain",isCalibratedCbGain[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedCcGain",isCalibratedCcGain[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedCaOffset",isCalibratedCaOffset[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedCbOffset",isCalibratedCbOffset[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedCcOffset",isCalibratedCcOffset[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedPa",isCalibratedPa[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedPb",isCalibratedPb[2]);
+				json_object_object_add(ChargingInfo3,"isCalibratedPc",isCalibratedPc[2]);
+			}
 			json_object_object_add(jobj2,"ChargingInfo3",ChargingInfo3);
 		}
 		if(strcmp(IsDO, "DO") == 0 || strcmp(IsDO, "DK") == 0){

+ 3 - 2
EVSE/Modularization/ocppfiles/MessageHandler.c

@@ -419,7 +419,7 @@ int sendTTIAInfo(uint8_t gun_index)
 
 	uint8_t tx_buf[80] = {0};
 	uint8_t logBuf[256]= {0};
-	uint8_t tempIndex, socStart, socEnd;
+	uint8_t tx_len, tempIndex, socStart, socEnd;
 	uint16_t PresentChargedEnergy;
 	struct tm tmStart, tmEnd;
 
@@ -626,12 +626,13 @@ int sendTTIAInfo(uint8_t gun_index)
 			bcopy((char *)server->h_addr, (char *)&dest_addr.sin_addr.s_addr, server->h_length);
 			dest_addr.sin_port = htons(ShmSysConfigAndInfo->SysConfig.TTIA_Info.server_port);
 
-			if(sendto(udp_socket_fd, tx_buf, strlen((char*)tx_buf), 0, &dest_addr, sizeof(dest_addr)) >= 0)
+			if((tx_len = sendto(udp_socket_fd, tx_buf, ARRAY_SIZE(tx_buf), 0, &dest_addr, sizeof(dest_addr))) >= 0)
 			{
 				for(uint8_t idx=0;idx<ARRAY_SIZE(tx_buf);idx++)
 				{
 					sprintf((char*)logBuf, "%s %02X", logBuf, tx_buf[idx]);
 				}
+				DEBUG_TTIA_INFO("TX raw data length: %d\n", tx_len);
 				DEBUG_TTIA_INFO("Message raw: %s\n", logBuf);
 				DEBUG_TTIA_INFO("OCPP Transaction ID: %d\n", ShmOCPP16Data->StopTransaction[gun_index].TransactionId);
 				DEBUG_TTIA_INFO("TTIA server address: %s\n", ShmSysConfigAndInfo->SysConfig.TTIA_Info.server_addr);

+ 110 - 6
EVSE/Projects/AW-CCS/Apps/Module_InternalComm.c

@@ -1011,6 +1011,68 @@ unsigned char Query_Power_Consumption(unsigned char fd, unsigned char targetAddr
 	return result;
 }
 
+unsigned char Query_MeterIc_CorrectionPara(unsigned char fd, unsigned char targetAddr, MeterIcCorrection *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[8] = {0xaa, 0x00, targetAddr, CMD_QUERY_METER_IC_CORRECTION_PARA, 0x01, 0x00, 0xb0, 0xb0};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	for(int idx=0;idx<(tx[4] | tx[5]<<8);idx++)
+		chksum ^= tx[6+idx];
+	tx[7] = chksum;
+
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 0)
+	{
+		if(len < (6+(rx[4] | rx[5]<<8)))
+			return result;
+
+		chksum = 0x00;
+		for(int idx=0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6]) == 0xb0)
+		{
+			uint32_t cali_flag = (rx[7] | (rx[8]<<8) | (rx[9]<<16) | (rx[10]<<24));
+
+			if(!(cali_flag & 0x80000000))
+			{
+				Ret_Buf->bits.isCalibratedVaGain = cali_flag & (1 << 0) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedVbGain = cali_flag & (1 << 1) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedVcGain = cali_flag & (1 << 2) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedVaOffset = cali_flag & (1 << 3) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedVbOffset = cali_flag & (1 << 4) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedVcOffset = cali_flag & (1 << 5) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedCaGain = cali_flag & (1 << 6) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedCbGain = cali_flag & (1 << 7) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedCcGain = cali_flag & (1 << 8) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedCaOffset = cali_flag & (1 << 9) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedCbOffset = cali_flag & (1 << 10) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedCcOffset = cali_flag & (1 << 11) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedPa = cali_flag & (1 << 12) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedPb = cali_flag & (1 << 13) ? 1 : 0;
+				Ret_Buf->bits.isCalibratedPc = cali_flag & (1 << 14) ? 1 : 0;
+			}
+			else
+			{
+				Ret_Buf->value = 0;
+			}
+
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
 unsigned char Config_Fan_Speed(unsigned char fd, unsigned char targetAddr, FanSpeed *Set_Buf)
 {
 	unsigned char result = FAIL;
@@ -1201,7 +1263,7 @@ unsigned char Config_Gpio_Output(unsigned char fd, unsigned char targetAddr, Gpi
 
 	for(int idx=0;idx<(tx[4] | tx[5]<<8);idx++)
 		chksum ^= tx[6+idx];
-	tx[14] = chksum;
+	tx[8] = chksum;
 
 	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
 
@@ -1496,7 +1558,7 @@ unsigned char Config_AC_MaxCurrent_And_CpPwmDuty(unsigned char fd, unsigned char
 			(rx[2] == tx[1]) &&
 			(rx[1] == tx[2]) &&
 			(rx[3] == tx[3]) &&
-			(rx[6] == 0x01))
+			((rx[6] == 0x00) || (rx[6] == 0x01)))
 		{
 			result = PASS;
 		}
@@ -1763,7 +1825,7 @@ unsigned char Update_Transfer(unsigned char fd, unsigned char targetAddr, unsign
 
 	for(int idx=0;idx<(tx[4] | tx[5]<<8);idx++)
 		chksum ^= tx[6+idx];
-	tx[sizeof(tx)-1] = chksum;
+	tx[ARRAY_SIZE(tx)-1] = chksum;
 
 	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
 
@@ -2758,7 +2820,7 @@ int main(void)
 						if(ShmCharger->gun_info[gun_index].mcuFlag.isReadFwVerPass != PASS)
 						{
 							DEBUG_INFO("===========================================\n");
-							DEBUG_INFO("==== Normal priority polling : Case 21-1===\n");
+							DEBUG_INFO("==== Normal priority polling : Case 19-1===\n");
 							DEBUG_INFO("===========================================\n");
 							if(Query_FW_Ver(Uart1Fd, (gun_index>0?ADDR_AC_PRIMARY_2:ADDR_AC_PRIMARY_1), &ShmCharger->gun_info[gun_index].ver) == PASS)
 							{
@@ -2778,13 +2840,55 @@ int main(void)
 							}
 						}
 
+						//===============================
+						// Query meter ic correction status
+						//===============================
+						if(ShmCharger->gun_info[gun_index].mcuFlag.isReadMeterIcCorrectionStatus != PASS)
+						{
+							DEBUG_INFO("===========================================\n");
+							DEBUG_INFO("==== Normal priority polling : Case 19-2===\n");
+							DEBUG_INFO("===========================================\n");
+							if(Query_MeterIc_CorrectionPara(Uart1Fd, (gun_index>0?ADDR_AC_PRIMARY_2:ADDR_AC_PRIMARY_1), &ShmCharger->gun_info[gun_index].meterIcCorrectionStatus) == PASS)
+							{
+								DEBUG_INFO("MCU-%d get meter ic correction status: 0x%08X\n", gun_index, ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.value);
+
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedVaGain = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedVaGain;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedVbGain = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedVbGain;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedVcGain = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedVcGain;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedVaOffset = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedVaOffset;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedVbOffset = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedVbOffset;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedVcOffset = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedVcOffset;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedCaGain = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedCaGain;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedCbGain = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedCbGain;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedCcGain = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedCcGain;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedCaOffset = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedCaOffset;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedCbOffset = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedCbOffset;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedCcOffset = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedCcOffset;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedPa = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedPa;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedPb = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedPb;
+								ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].meterIcCalInfo.isCalibratedPc = ShmCharger->gun_info[gun_index].meterIcCorrectionStatus.bits.isCalibratedPc;
+
+								ShmCharger->gun_info[gun_index].mcuFlag.isReadMeterIcCorrectionStatus = PASS;
+
+								failCount[gun_index] = 0;
+							}
+							else
+							{
+								DEBUG_WARN("MCU-%d get meter ic correction status fail...%d\n", gun_index, failCount[gun_index]);
+								if(failCount[gun_index]<USHRT_MAX)
+									failCount[gun_index]++;
+								else
+									failCount[gun_index] = FAIL_SPEC_COMM;
+							}
+						}
+
 						//===============================
 						// Config primary MCU serial number
 						//===============================
 						if(ShmCharger->gun_info[gun_index].mcuFlag.isSetSerialNumberPass != PASS)
 						{
 							DEBUG_INFO("===========================================\n");
-							DEBUG_INFO("==== Normal priority polling : Case 21-2===\n");
+							DEBUG_INFO("==== Normal priority polling : Case 19-3===\n");
 							DEBUG_INFO("===========================================\n");
 							memcpy(ShmCharger->evseId.serial_number, ShmSysConfigAndInfo->SysConfig.SerialNumber, ARRAY_SIZE(ShmCharger->evseId.serial_number));
 							if(Config_Serial_Number(Uart1Fd, (gun_index>0?ADDR_AC_PRIMARY_2:ADDR_AC_PRIMARY_1), &ShmCharger->evseId))
@@ -2810,7 +2914,7 @@ int main(void)
 						if(ShmCharger->gun_info[gun_index].mcuFlag.isSetModelNamePass != PASS)
 						{
 							DEBUG_INFO("===========================================\n");
-							DEBUG_INFO("==== Normal priority polling : Case 21-3===\n");
+							DEBUG_INFO("==== Normal priority polling : Case 19-4===\n");
 							DEBUG_INFO("===========================================\n");
 							memcpy(ShmCharger->evseId.model_name, ShmSysConfigAndInfo->SysConfig.ModelName, ARRAY_SIZE(ShmCharger->evseId.model_name));
 							if(Config_Model_Name(Uart1Fd, (gun_index>0?ADDR_AC_PRIMARY_2:ADDR_AC_PRIMARY_1), &ShmCharger->evseId))

+ 1 - 0
EVSE/Projects/AW-CCS/Apps/Module_InternalComm.h

@@ -33,6 +33,7 @@ enum MESSAGE_COMMAND
 	CMD_QUERY_BLE_CENTRAL_ID = 0x2B,
 	CMD_QUERY_POWER_CONSUMPTION = 0x2C,
 	CMD_QUERY_GUN_PLUGIN_TIMES = 0x2D,
+	CMD_QUERY_METER_IC_CORRECTION_PARA = 0x36,
 
 	CMD_CONFIG_FAN_SPEED = 0x81,
 	CMD_CONFIG_SERIAL_NUMBER = 0x82,

+ 27 - 0
EVSE/Projects/AW-CCS/Apps/main.h

@@ -462,6 +462,7 @@ typedef struct MCU_OP_FLAG
 	unsigned char isReadFwVerPass:1;
 	unsigned char isMcuUpgradeReq:1;
 	unsigned char isSetCpPwmDuty:1;
+	unsigned char isReadMeterIcCorrectionStatus:1;
 }Mcu_Op_Flag;
 
 typedef struct SYSTEM_ALARM_CODE
@@ -540,6 +541,30 @@ typedef struct SET_AUX_POWER_SWITCH
 	uint8_t power_switch;	// 0: OFF	1: ON
 }Set_Aux_Power_Switch;
 
+typedef union
+{
+	unsigned int value;
+	struct
+	{
+		unsigned int isCalibratedVaGain:1;					// Voltage phase a gain is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedVbGain:1;					// Voltage phase b gain is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedVcGain:1;					// Voltage phase c gain is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedVaOffset:1;				// Voltage phase a offset is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedVbOffset:1;				// Voltage phase b offset is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedVcOffset:1;				// Voltage phase c offset is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedCaGain:1;					// Current phase a gain is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedCbGain:1;					// Current phase b gain is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedCcGain:1;					// Current phase c gain is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedCaOffset:1;				// Current phase a offset is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedCbOffset:1;				// Current phase b offset is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedCcOffset:1;				// Current phase c offset is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedPa:1;						// Phase angle a is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedPb:1;						// Phase angle b gain is calibrated, 0: default	1: Calibrated
+		unsigned int isCalibratedPc:1;						// Phase angle c gain is calibrated, 0: default	1: Calibrated
+		unsigned int :17;
+	}bits;
+}MeterIcCorrection;
+
 typedef struct CCS_INFO
 {
 	uint8_t		BatteryChargeType;				/*0x00: AC charging, 0x01: DC charging*/
@@ -705,6 +730,8 @@ typedef struct GUN_INFO
 	uint16_t										targetCurrent;
 	uint8_t											evReadyState;
 	uint8_t											resultAuthorization;
+	MeterIcCorrection								meterIcCorrectionStatus;
+
 
 	uint16_t										isAuthPassEnd:1;
 	uint16_t										rfidReq:1;

+ 90 - 90
EVSE/rootfs/var/www/set_charging.php

@@ -1340,10 +1340,10 @@ CORE STYLES ABOVE - NO TOUCHY
 										<div class="form-group" style="display:block">
 											<label>Meter IC Calibration Status</label>
 											<span style="display:block">
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VaGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VaGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VaGain" <?php echo $obj['ChargingInfo1']['isCalibratedVaGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1351,10 +1351,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VbGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VbGain" data-size="" data-style="rounded">
 														<input  disabled type="checkbox" id="VbGain" <?php echo $obj['ChargingInfo1']['isCalibratedVbGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1362,10 +1362,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VcGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VcGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VcGain" <?php echo $obj['ChargingInfo1']['isCalibratedVcGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1375,10 +1375,10 @@ CORE STYLES ABOVE - NO TOUCHY
 												</span>
 											</span>
 											<span class="" style="display:block">
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VaOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VaOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VaOffset" <?php echo $obj['ChargingInfo1']['isCalibratedVaOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1386,10 +1386,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VbOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VbOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VbOffset" <?php echo $obj['ChargingInfo1']['isCalibratedVbOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1397,10 +1397,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VcOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VcOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VcOffset" <?php echo $obj['ChargingInfo1']['isCalibratedVcOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1410,10 +1410,10 @@ CORE STYLES ABOVE - NO TOUCHY
 												</span>
 											</span>
 											<span class="" style="display:block">
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CaGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CaGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CaGain" <?php echo $obj['ChargingInfo1']['isCalibratedCaGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1421,10 +1421,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CbGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CbGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CbGain" <?php echo $obj['ChargingInfo1']['isCalibratedCbGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1432,10 +1432,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CcGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CcGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CcGain" <?php echo $obj['ChargingInfo1']['isCalibratedCcGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1445,10 +1445,10 @@ CORE STYLES ABOVE - NO TOUCHY
 												</span>
 											</span>
 											<span class="" style="display:block">
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CaOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CaOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CaOffset" <?php echo $obj['ChargingInfo1']['isCalibratedCaOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1456,10 +1456,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CbOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CbOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CbOffset" <?php echo $obj['ChargingInfo1']['isCalibratedCbOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1467,10 +1467,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CcOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CcOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CcOffset" <?php echo $obj['ChargingInfo1']['isCalibratedCcOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1480,10 +1480,10 @@ CORE STYLES ABOVE - NO TOUCHY
 												</span>
 											</span>
 											<span class="" style="display:block">
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>Pa</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="Pa" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="Pa" <?php echo $obj['ChargingInfo1']['isCalibratedPa']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1491,10 +1491,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>Pb</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="Pb" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="Pb" <?php echo $obj['ChargingInfo1']['isCalibratedPb']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1502,10 +1502,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>Pc</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="Pc" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="Pc" <?php echo $obj['ChargingInfo1']['isCalibratedPc']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1611,10 +1611,10 @@ CORE STYLES ABOVE - NO TOUCHY
 										<div class="form-group" style="display:block">
 											<label>Meter IC Calibration Status</label>
 											<span style="display:block">
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VaGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VaGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VaGain" <?php echo $obj['ChargingInfo2']['isCalibratedVaGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1622,10 +1622,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VbGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VbGain" data-size="" data-style="rounded">
 														<input  disabled type="checkbox" id="VbGain" <?php echo $obj['ChargingInfo2']['isCalibratedVbGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1633,10 +1633,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VcGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VcGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VcGain" <?php echo $obj['ChargingInfo2']['isCalibratedVcGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1646,10 +1646,10 @@ CORE STYLES ABOVE - NO TOUCHY
 												</span>
 											</span>
 											<span class="" style="display:block">
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VaOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VaOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VaOffset" <?php echo $obj['ChargingInfo2']['isCalibratedVaOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1657,10 +1657,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VbOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VbOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VbOffset" <?php echo $obj['ChargingInfo2']['isCalibratedVbOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1668,10 +1668,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VcOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VcOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VcOffset" <?php echo $obj['ChargingInfo2']['isCalibratedVcOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1681,10 +1681,10 @@ CORE STYLES ABOVE - NO TOUCHY
 												</span>
 											</span>
 											<span class="" style="display:block">
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CaGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CaGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CaGain" <?php echo $obj['ChargingInfo2']['isCalibratedCaGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1692,10 +1692,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CbGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CbGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CbGain" <?php echo $obj['ChargingInfo2']['isCalibratedCbGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1703,10 +1703,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CcGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CcGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CcGain" <?php echo $obj['ChargingInfo2']['isCalibratedCcGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1716,10 +1716,10 @@ CORE STYLES ABOVE - NO TOUCHY
 												</span>
 											</span>
 											<span class="" style="display:block">
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CaOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CaOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CaOffset" <?php echo $obj['ChargingInfo2']['isCalibratedCaOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1727,10 +1727,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CbOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CbOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CbOffset" <?php echo $obj['ChargingInfo2']['isCalibratedCbOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1738,10 +1738,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CcOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CcOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CcOffset" <?php echo $obj['ChargingInfo2']['isCalibratedCcOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1751,10 +1751,10 @@ CORE STYLES ABOVE - NO TOUCHY
 												</span>
 											</span>
 											<span class="" style="display:block">
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>Pa</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="Pa" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="Pa" <?php echo $obj['ChargingInfo2']['isCalibratedPa']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1762,10 +1762,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>Pb</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="Pb" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="Pb" <?php echo $obj['ChargingInfo2']['isCalibratedPb']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1773,10 +1773,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>Pc</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="Pc" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="Pc" <?php echo $obj['ChargingInfo2']['isCalibratedPc']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1882,10 +1882,10 @@ CORE STYLES ABOVE - NO TOUCHY
 										<div class="form-group" style="display:block">
 											<label>Meter IC Calibration Status</label>
 											<span style="display:block">
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VaGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VaGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VaGain" <?php echo $obj['ChargingInfo3']['isCalibratedVaGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1893,10 +1893,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VbGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VbGain" data-size="" data-style="rounded">
 														<input  disabled type="checkbox" id="VbGain" <?php echo $obj['ChargingInfo3']['isCalibratedVbGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1904,10 +1904,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VcGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VcGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VcGain" <?php echo $obj['ChargingInfo3']['isCalibratedVcGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1917,10 +1917,10 @@ CORE STYLES ABOVE - NO TOUCHY
 												</span>
 											</span>
 											<span class="" style="display:block">
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VaOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VaOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VaOffset" <?php echo $obj['ChargingInfo3']['isCalibratedVaOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1928,10 +1928,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VbOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VbOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VbOffset" <?php echo $obj['ChargingInfo3']['isCalibratedVbOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1939,10 +1939,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>VcOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="VcOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="VcOffset" <?php echo $obj['ChargingInfo3']['isCalibratedVcOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1952,10 +1952,10 @@ CORE STYLES ABOVE - NO TOUCHY
 												</span>
 											</span>
 											<span class="" style="display:block">
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CaGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CaGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CaGain" <?php echo $obj['ChargingInfo3']['isCalibratedCaGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1963,10 +1963,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 ">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CbGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CbGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CbGain" <?php echo $obj['ChargingInfo3']['isCalibratedCbGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1974,10 +1974,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CcGain</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CcGain" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CcGain" <?php echo $obj['ChargingInfo3']['isCalibratedCcGain']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1987,10 +1987,10 @@ CORE STYLES ABOVE - NO TOUCHY
 												</span>
 											</span>
 											<span class="" style="display:block">
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CaOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CaOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CaOffset" <?php echo $obj['ChargingInfo3']['isCalibratedCaOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -1998,10 +1998,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CbOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CbOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CbOffset" <?php echo $obj['ChargingInfo3']['isCalibratedCbOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -2009,10 +2009,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>CcOffset</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="CcOffset" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="CcOffset" <?php echo $obj['ChargingInfo3']['isCalibratedCcOffset']==1?"checked":"";?>>
 														<span class="toggle">
@@ -2022,10 +2022,10 @@ CORE STYLES ABOVE - NO TOUCHY
 												</span>
 											</span>
 											<span class="" style="display:block">
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>Pa</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="Pa" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="Pa" <?php echo $obj['ChargingInfo3']['isCalibratedPa']==1?"checked":"";?>>
 														<span class="toggle">
@@ -2033,10 +2033,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>Pb</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="Pb" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="Pb" <?php echo $obj['ChargingInfo3']['isCalibratedPb']==1?"checked":"";?>>
 														<span class="toggle">
@@ -2044,10 +2044,10 @@ CORE STYLES ABOVE - NO TOUCHY
 														</span>
 													</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label>Pc</label>
 												</span>
-												<span class="col-lg-2 pull-left">
+												<span class="col-lg-2 col-md-2 col-sm-6 col-xs-6">
 													<label class="toggle-switchy" for="Pc" data-size="" data-style="rounded">
 														<input disabled type="checkbox" id="Pc" <?php echo $obj['ChargingInfo3']['isCalibratedPc']==1?"checked":"";?>>
 														<span class="toggle">