..
This commit is contained in:
@@ -106,7 +106,7 @@ namespace arDev
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var rxstr = string.Join(" ", data.Select(t => t.ToString("X2")));
|
var rxstr = string.Join(" ", data.Select(t => t.ToString("X2")));
|
||||||
RaiseMessage(MessageType.Recv, $"Querh:{QueryIndex},Data:{rxstr}" );
|
RaiseMessage(MessageType.Recv, $"Querh:{QueryIndex},Data:{rxstr}");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QueryIndex == 0)
|
if (QueryIndex == 0)
|
||||||
@@ -179,6 +179,13 @@ namespace arDev
|
|||||||
batH = (UInt16)(batH | batL);
|
batH = (UInt16)(batH | batL);
|
||||||
Current_Volt = (float)(batH / 100.0);
|
Current_Volt = (float)(batH / 100.0);
|
||||||
|
|
||||||
|
//충방전전류
|
||||||
|
//batH = (UInt16)LastReceiveBuffer[6];
|
||||||
|
//batL = (UInt16)LastReceiveBuffer[7];
|
||||||
|
//batH = (UInt16)(batH << 8);
|
||||||
|
//batH = (UInt16)(batH | batL);
|
||||||
|
//Charge_Amp = (float)(batH / 100.0);
|
||||||
|
|
||||||
//잔량확인
|
//잔량확인
|
||||||
batH = (UInt16)LastReceiveBuffer[8];
|
batH = (UInt16)LastReceiveBuffer[8];
|
||||||
batL = (UInt16)LastReceiveBuffer[9];
|
batL = (UInt16)LastReceiveBuffer[9];
|
||||||
@@ -325,6 +332,14 @@ namespace arDev
|
|||||||
public float chk_values { get; set; } = 0f;
|
public float chk_values { get; set; } = 0f;
|
||||||
public float chk_valuee { get; set; } = 0f;
|
public float chk_valuee { get; set; } = 0f;
|
||||||
|
|
||||||
|
public float Charge_Amp { get; set; } = 0f;
|
||||||
|
public Int16 Charge_watt
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (Int16)((Charge_Amp / 100.0) * Current_Volt);
|
||||||
|
}
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 전압
|
/// 전압
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace Project.ViewForm
|
|||||||
{
|
{
|
||||||
timer1.Stop();
|
timer1.Stop();
|
||||||
this.arLabel1.Text = PUB.BMS.Current_Level.ToString("N1") + "%";
|
this.arLabel1.Text = PUB.BMS.Current_Level.ToString("N1") + "%";
|
||||||
this.arLabel1.Sign = PUB.BMS.Current_Volt.ToString() + "v";
|
this.arLabel1.Sign = $"{PUB.BMS.Current_Volt}v, {PUB.BMS.Charge_watt}w, {PUB.BMS.Charge_Amp}";// PUB.BMS.Current_Volt.ToString() + "v";
|
||||||
this.cv1.Text = PUB.BMS.CellVoltage[0].ToString("N3") + "v";
|
this.cv1.Text = PUB.BMS.CellVoltage[0].ToString("N3") + "v";
|
||||||
this.cv2.Text = PUB.BMS.CellVoltage[1].ToString("N3") + "v";
|
this.cv2.Text = PUB.BMS.CellVoltage[1].ToString("N3") + "v";
|
||||||
this.cv3.Text = PUB.BMS.CellVoltage[2].ToString("N3") + "v";
|
this.cv3.Text = PUB.BMS.CellVoltage[2].ToString("N3") + "v";
|
||||||
|
|||||||
Reference in New Issue
Block a user