add temp1, temp2
This commit is contained in:
@@ -35,59 +35,6 @@ namespace Project
|
||||
}
|
||||
}
|
||||
|
||||
//ePosition ParsePosition(uint tag, out string dirBW)
|
||||
//{
|
||||
// var tagstr = tag.ToString();
|
||||
// var tagno = tagstr.Substring(0, tagstr.Length - 1);
|
||||
|
||||
// if (tag == PUB.setting.TAGNOT) { dirBW = "0"; return ePosition.NOT; }
|
||||
|
||||
// else if (tag == PUB.setting.TAG_QA_QC) { dirBW = "0"; return ePosition.QA_QC; }
|
||||
// else if (tag == PUB.setting.TAG_QC_F1) { dirBW = "0"; return ePosition.QC_F1; }
|
||||
// else if (tag == PUB.setting.TAG_F1_F2) { dirBW = "0"; return ePosition.F1_F2; }
|
||||
// else if (tag == PUB.setting.TAG_F2_F3) { dirBW = "0"; return ePosition.F2_F3; }
|
||||
// else if (tag == PUB.setting.TAG_F3_F4) { dirBW = "0"; return ePosition.F3_F4; }
|
||||
// else if (tag == PUB.setting.TAG_F4_F5) { dirBW = "0"; return ePosition.F4_F5; }
|
||||
|
||||
// else if (tag == PUB.setting.TAGQAB) { dirBW = "0"; return ePosition.QA; }
|
||||
// else if (tag == PUB.setting.TAGQCB) { dirBW = "0"; return ePosition.QC; }
|
||||
// else if (tag == PUB.setting.TAGF1B) { dirBW = "0"; return ePosition.F1; }
|
||||
// else if (tag == PUB.setting.TAGF2B) { dirBW = "0"; return ePosition.F2; }
|
||||
// else if (tag == PUB.setting.TAGF3B) { dirBW = "0"; return ePosition.F3; }
|
||||
// else if (tag == PUB.setting.TAGF4B) { dirBW = "0"; return ePosition.F4; }
|
||||
// else if (tag == PUB.setting.TAGF5B) { dirBW = "0"; return ePosition.F5; }
|
||||
// //else if (tag == PUB.setting.TAGQAA) { dirBW = "1"; return ePosition.QA; }
|
||||
// //else if (tag == PUB.setting.TAGCHA) { dirBW = "1"; return ePosition.CHARGE; }
|
||||
// else if (tag == PUB.setting.TAGQAA) { dirBW = "1"; return ePosition.QA; }
|
||||
// else if (tag == PUB.setting.TAGQCA) { dirBW = "1"; return ePosition.QC; }
|
||||
// else if (tag == PUB.setting.TAGF1A) { dirBW = "1"; return ePosition.F1; }
|
||||
// else if (tag == PUB.setting.TAGF2A) { dirBW = "1"; return ePosition.F2; }
|
||||
// else if (tag == PUB.setting.TAGF3A) { dirBW = "1"; return ePosition.F3; }
|
||||
// else if (tag == PUB.setting.TAGF4A) { dirBW = "1"; return ePosition.F4; }
|
||||
// else if (tag == PUB.setting.TAGF5A) { dirBW = "1"; return ePosition.F5; }
|
||||
// else if (tag == PUB.setting.TAGPOT) { dirBW = "0"; return ePosition.POT; }
|
||||
// else
|
||||
// {
|
||||
// if (tag > 9350 && tag < 9400)
|
||||
// {
|
||||
// dirBW = "0"; return ePosition.QC_F1;
|
||||
// }
|
||||
// else if (tag > 9250 && tag < 9300)
|
||||
// {
|
||||
// dirBW = "0"; return ePosition.QA_QC;
|
||||
// }
|
||||
// else if (tag > 9000 && tag < 9100)
|
||||
// {
|
||||
// dirBW = "0"; return ePosition.NOT;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// dirBW = "0"; return ePosition.NONE;
|
||||
// }
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
bool _charging = false;
|
||||
private void AGV_DataReceive(object sender, arDev.Narumi.DataEventArgs e)
|
||||
@@ -107,6 +54,11 @@ namespace Project
|
||||
VAR.BOOL[eVarBool.AGV_ERROR] = PUB.AGV.error.Value > 0;
|
||||
VAR.BOOL[eVarBool.EMERGENCY] = PUB.AGV.error.Emergency;
|
||||
|
||||
if (PUB.AGV.data.Direction =='B')
|
||||
PUB.mapctl.agv.CurrentDirection = AGVControl.Models.Direction.Backward;
|
||||
else
|
||||
PUB.mapctl.agv.CurrentDirection = AGVControl.Models.Direction.Forward;
|
||||
|
||||
if (PUB.AGV.signal.mark_sensor == false)
|
||||
{
|
||||
if (VAR.BOOL[eVarBool.MARK_SENSOROFF] == false)
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Project
|
||||
DateTime lastbmstime = DateTime.Now;
|
||||
private void Bms_Message(object sender, arDev.BMS.MessageEventArgs e)
|
||||
{
|
||||
if (e.MsgType == arDev.arRS232.MessageType.Error) PUB.logbms.AddE( e.Message);
|
||||
if (e.MsgType == arRS232.MessageType.Error) PUB.logbms.AddE( e.Message);
|
||||
else
|
||||
{
|
||||
var hexstr = e.Data.GetHexString().Trim();
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace Project
|
||||
{
|
||||
if (PUB.sm.Step < eSMStep.IDLE || PUB.sm.Step >= eSMStep.CLOSING) return;
|
||||
|
||||
|
||||
|
||||
//agv connect
|
||||
ConnectSerialPort(PUB.AGV, PUB.setting.Port_AGV, PUB.setting.Baud_AGV,
|
||||
eVarTime.LastConn_AGV, eVarTime.LastConnTry_AGV, eVarTime.LastRecv_AGV);
|
||||
@@ -108,8 +108,18 @@ namespace Project
|
||||
eVarTime.LastConn_XBE, eVarTime.LastConnTry_XBE, eVarTime.LastRecv_XBE);
|
||||
|
||||
//bms connect
|
||||
ConnectSerialPort(PUB.BMS, PUB.setting.Port_BAT, PUB.setting.Baud_BAT,
|
||||
eVarTime.LastConn_BAT, eVarTime.LastConnTry_BAT, eVarTime.LastRecv_BAT);
|
||||
if (PUB.BMS.IsOpen == false)
|
||||
{
|
||||
var ts = VAR.TIME.RUN(eVarTime.LastConn_BAT);
|
||||
if (ts.TotalSeconds > 3)
|
||||
{
|
||||
PUB.BMS.PortName = PUB.setting.Port_BAT;
|
||||
PUB.BMS.Open();
|
||||
VAR.TIME.Update(eVarTime.LastConn_BAT);
|
||||
}
|
||||
}
|
||||
//ConnectSerialPort(PUB.BMS, PUB.setting.Port_BAT, PUB.setting.Baud_BAT,
|
||||
// eVarTime.LastConn_BAT, eVarTime.LastConnTry_BAT, eVarTime.LastRecv_BAT);
|
||||
|
||||
//지그비상태전송
|
||||
if (PUB.XBE != null && PUB.XBE.IsOpen)
|
||||
@@ -133,9 +143,9 @@ namespace Project
|
||||
PUB.BMS.SendQuery();
|
||||
}
|
||||
|
||||
|
||||
Update_BatteryWarnSpeak();
|
||||
|
||||
|
||||
Update_BatteryWarnSpeak();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,8 @@ namespace Project
|
||||
lbBat.CurA = PUB.BMS.Current_Amp;
|
||||
lbBat.IsOpen = PUB.BMS.IsOpen;
|
||||
|
||||
if (PUB.mapctl != null)
|
||||
PUB.mapctl.Invalidate();
|
||||
|
||||
//쓰레드로인해서 메인에서 진행하게한다. SPS는 메인쓰레드에서 진행 됨
|
||||
//팝을 제거 혹은 표시하는 기능
|
||||
@@ -391,7 +393,7 @@ namespace Project
|
||||
var tswarnmsg = VAR.TIME.RUN(eVarTime.BatWarnTime);
|
||||
if (tswarnmsg.TotalSeconds >= timeoutsec)
|
||||
{
|
||||
if (VAR.BOOL[eVarBool.FLAG_CHARGEONM]==false && VAR.BOOL[eVarBool.FLAG_CHARGEONA] == false)
|
||||
if (VAR.BOOL[eVarBool.FLAG_CHARGEONM] == false && VAR.BOOL[eVarBool.FLAG_CHARGEONA] == false)
|
||||
{
|
||||
if (PUB.BMS.IsValid == false)
|
||||
{
|
||||
@@ -409,7 +411,7 @@ namespace Project
|
||||
{
|
||||
//충전중이므로 메세지처리를 하지 않는다
|
||||
}
|
||||
|
||||
|
||||
|
||||
VAR.TIME.Update(eVarTime.BatWarnTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user