..
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Project
|
||||
|
||||
//충전중이라면 최대 충전 시간을 체크한다.
|
||||
var tsChargeRunTime = VAR.TIME.RUN(eVarTime.ChargeStart);
|
||||
if (PUB.BMS.Current_Level >= PUB.setting.ChargeMaxLevel)
|
||||
if (PUB.BMS.BMSInformation.rsoc >= PUB.setting.ChargeMaxLevel)
|
||||
{
|
||||
PUB.AGV.AGVCharge(PUB.setting.ChargerID, false);
|
||||
PUB.sm.ClearRunStep();
|
||||
|
||||
@@ -170,18 +170,13 @@ namespace Project
|
||||
|
||||
}
|
||||
|
||||
private void Bms_BMSDataReceive(object sender, EventArgs e)
|
||||
private void Bms_BMSDataReceive(object sender, arDev.BMSInformationEventArgs e)
|
||||
{
|
||||
|
||||
VAR.TIME[eVarTime.LastRecv_BAT] = DateTime.Now;
|
||||
//PUB.mapctl.Manager.agv.BatteryLevel = PUB.BMS.Current_Level;
|
||||
//PUB.mapctl.Manager.agv.BatteryTemp1 = PUB.BMS.Current_temp1;
|
||||
//PUB.mapctl.Manager.agv.BatteryTemp2 = PUB.BMS.Current_temp2;
|
||||
|
||||
// [Sync] Update VirtualAGV Battery
|
||||
PUB.UpdateAGVBattery(PUB.BMS.Current_Level);
|
||||
PUB.UpdateAGVBattery(e.Data.rsoc);
|
||||
|
||||
if (PUB.BMS.Current_Level <= PUB.setting.ChargeStartLevel)
|
||||
if (e.Data.rsoc <= PUB.setting.ChargeStartLevel)
|
||||
{
|
||||
//배터리 레벨이 기준보다 낮다면 경고를 활성화 한다
|
||||
if (VAR.BOOL[eVarBool.BATTERY_LOW] == false)
|
||||
|
||||
@@ -59,10 +59,11 @@ namespace Project
|
||||
panTopMenu.Enabled == false) panTopMenu.Enabled = true;
|
||||
|
||||
//배터리정보표시
|
||||
lbBat.VLevel = PUB.BMS.Current_Level;
|
||||
lbBat.Volt = PUB.BMS.Current_Volt;
|
||||
lbBat.MaxA = PUB.BMS.Current_MaxAmp;
|
||||
lbBat.CurA = PUB.BMS.Current_Amp;
|
||||
var bmsinfo = PUB.BMS.BMSInformation;
|
||||
lbBat.VLevel = bmsinfo.rsoc;
|
||||
lbBat.Volt = bmsinfo.packVoltage;
|
||||
lbBat.MaxA = bmsinfo.fullCapacity;
|
||||
lbBat.CurA = bmsinfo.remainingCapacity;
|
||||
lbBat.IsOpen = PUB.BMS.IsOpen;
|
||||
|
||||
//쓰레드로인해서 메인에서 진행하게한다. SPS는 메인쓰레드에서 진행 됨
|
||||
@@ -174,8 +175,8 @@ namespace Project
|
||||
var tsIdle = VAR.TIME.RUN(eVarTime.ChargeStart);
|
||||
lbIDLE.ProgressMax = 100;// PUB.setting.ChargeMaxLevel;
|
||||
lbIDLE.ProgressMin = 0;
|
||||
lbIDLE.Text = $"{PUB.BMS.Current_Level:N0}%";
|
||||
lbIDLE.ProgressValue = (float)PUB.BMS.Current_Level;
|
||||
lbIDLE.Text = $"{PUB.BMS.BMSInformation.rsoc}%";
|
||||
lbIDLE.ProgressValue = (float)PUB.BMS.BMSInformation.rsoc;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -184,8 +185,8 @@ namespace Project
|
||||
var tsIdle = VAR.TIME.RUN(eVarTime.ChargeStart);
|
||||
lbIDLE.ProgressMax = PUB.setting.ChargeMaxLevel;
|
||||
lbIDLE.ProgressMin = 0;
|
||||
lbIDLE.Text = $"({PUB.BMS.Current_Level:N0}/{PUB.setting.ChargeMaxLevel})%";
|
||||
lbIDLE.ProgressValue = (float)PUB.BMS.Current_Level;
|
||||
lbIDLE.Text = $"({PUB.BMS.BMSInformation.rsoc}/{PUB.setting.ChargeMaxLevel})%";
|
||||
lbIDLE.ProgressValue = (float)PUB.BMS.BMSInformation.rsoc;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
@@ -380,7 +381,7 @@ namespace Project
|
||||
/// </summary>
|
||||
void Update_BatteryWarnSpeak()
|
||||
{
|
||||
if (PUB.BMS == null || PUB.BMS.Current_Level > 40) return;
|
||||
if (PUB.BMS == null || PUB.BMS.BMSInformation.rsoc > 40) return;
|
||||
|
||||
//가동중이거나 수동모드에서는 메세지 알림한다
|
||||
if (PUB.AGV.system1.agv_run || VAR.BOOL[eVarBool.FLAG_AUTORUN] == false)
|
||||
@@ -605,7 +606,7 @@ namespace Project
|
||||
{
|
||||
//남은 충전시간 계산
|
||||
string msg = string.Empty;
|
||||
if (PUB.BMS.Current_Level < PUB.setting.ChargeEmergencyLevel)
|
||||
if (PUB.BMS.BMSInformation.rsoc < PUB.setting.ChargeEmergencyLevel)
|
||||
{
|
||||
msg = $"충전 진행 중(이동 불가)\n저전압으로 인해 사용이 불가 합니다";
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ namespace Project
|
||||
var prevDir = selectedAGV.PrevDirection;
|
||||
|
||||
// 고급 경로 계획 사용 (노드 객체 직접 전달)
|
||||
var advancedResult = _advancedPathfinder.FindPath(startNode, targetNode, prevNode, prevDir, currentDirection);
|
||||
var advancedResult = _advancedPathfinder.FindBasicPath(startNode, targetNode, prevNode, prevDir);
|
||||
|
||||
var _simulatorCanvas = PUB._mapCanvas;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user