Release v1.1.1.1: Anti-Theft buttons update, BMS history chg_wait column, and wait for charging status display

This commit is contained in:
2026-09-22 15:17:18 +09:00
parent df038ae86b
commit 33fee50a10
26 changed files with 1570 additions and 2643 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -29,6 +29,21 @@ namespace LFP_Manager.DataStructure
"Unknown7", // 7
"PRE-CHG + LMT", // 8
};
public static readonly string[] ANTI_THEFT_STATUS =
{
"Waiting for charging activation", // 0
"Activated", // 1
};
public static string GetAntiTheftStatusString(int status)
{
if (status >= 0 && status < ANTI_THEFT_STATUS.Length)
{
return ANTI_THEFT_STATUS[status];
}
return string.Format("Unknown ({0})", status);
}
}
public class CommType

View File

@@ -551,11 +551,13 @@ namespace LFP_Manager.DataStructure
{
public int Comm;
public int GyroScope;
public int Status;
public TAntiTheft()
{
Comm = 0;
GyroScope = 0;
Status = 0;
}
public TAntiTheft DeepCopy()
{
@@ -563,6 +565,7 @@ namespace LFP_Manager.DataStructure
{
Comm = Comm,
GyroScope = GyroScope,
Status = Status,
};
return newCopy;
}
@@ -688,6 +691,41 @@ namespace LFP_Manager.DataStructure
}
}
public enum UartTxType
{
Polling, // 주기적 상태 조회
WriteParam, // 파라미터 쓰기 (Holding Register)
WriteReg, // 레지스터 쓰기
WriteCoil, // 코일 쓰기
ReadReg, // 레지스터 읽기
FwUpdate, // 펌웨어 업데이트
Raw // 기타 원시 패킷
}
public class TUartTxItem
{
public UartTxType TxType { get; set; } = UartTxType.Raw;
public int SystemId { get; set; } = 0;
public ushort RegAddr { get; set; } = 0;
public ushort RegLen { get; set; } = 0;
public byte[] Data { get; set; } = null;
public bool ExpectReply { get; set; } = true;
public int TimeoutMs { get; set; } = 500;
public TUartTxItem() { }
public TUartTxItem(UartTxType type, int sysId, ushort regAddr, ushort regLen, byte[] data, bool expectReply = true, int timeoutMs = 500)
{
TxType = type;
SystemId = sysId;
RegAddr = regAddr;
RegLen = regLen;
Data = data;
ExpectReply = expectReply;
TimeoutMs = timeoutMs;
}
}
public class TUartTxBuff
{
public int InPos;
@@ -731,3 +769,4 @@ namespace LFP_Manager.DataStructure
}
}