This commit is contained in:
backuppc
2025-12-18 10:32:20 +09:00
parent 51579591a2
commit 9274727fa9
2 changed files with 17 additions and 2 deletions

View File

@@ -106,7 +106,7 @@ namespace arDev
else
{
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)
@@ -179,6 +179,13 @@ namespace arDev
batH = (UInt16)(batH | batL);
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];
batL = (UInt16)LastReceiveBuffer[9];
@@ -325,6 +332,14 @@ namespace arDev
public float chk_values { 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>