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 @@
namespace LFP_Manager.Controls
namespace LFP_Manager.Controls
{
partial class ucCalibration
{
@@ -29,10 +29,19 @@
private void InitializeComponent()
{
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
this.gbAntiTheft = new DevExpress.XtraEditors.GroupControl();
this.layoutControl4 = new DevExpress.XtraLayout.LayoutControl();
this.TeSensitive = new DevExpress.XtraEditors.TextEdit();
this.BtnAntiTheftEnable = new DevExpress.XtraEditors.SimpleButton();
this.BtnClearAntiTheftProtect = new DevExpress.XtraEditors.SimpleButton();
this.BtnAntiTheftDisable = new DevExpress.XtraEditors.SimpleButton();
this.TeAntiTheftGyroCurr = new DevExpress.XtraEditors.TextEdit();
this.BtnClearAlarm = new DevExpress.XtraEditors.SimpleButton();
this.layoutControlItemClearAlarm = new DevExpress.XtraLayout.LayoutControlItem();
this.BtnClearActivation = new DevExpress.XtraEditors.SimpleButton();
this.layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem();
this.simpleLabelItemAntiTheftStatus = new DevExpress.XtraLayout.SimpleLabelItem();
this.emptySpaceItem6 = new DevExpress.XtraLayout.EmptySpaceItem();
this.layoutControlItemClearActivation = new DevExpress.XtraLayout.LayoutControlItem();
this.gbBmsDateTime = new DevExpress.XtraEditors.GroupControl();
this.layoutControl3 = new DevExpress.XtraLayout.LayoutControl();
this.BtnGetCurrTime = new DevExpress.XtraEditors.SimpleButton();
@@ -79,22 +88,27 @@
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
this.simpleLabelItem2 = new DevExpress.XtraLayout.SimpleLabelItem();
this.TeAntiTheftGyroCurr = new DevExpress.XtraEditors.TextEdit();
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
this.emptySpaceItem5 = new DevExpress.XtraLayout.EmptySpaceItem();
this.layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup();
this.emptySpaceItem6 = new DevExpress.XtraLayout.EmptySpaceItem();
this.layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem21 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem20 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItemAntiTheftGroup = new DevExpress.XtraLayout.LayoutControlItem();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
this.layoutControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gbAntiTheft)).BeginInit();
this.gbAntiTheft.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControl4)).BeginInit();
this.layoutControl4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.TeSensitive.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.TeAntiTheftGyroCurr.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItemAntiTheftStatus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemClearAlarm)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemClearActivation)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gbBmsDateTime)).BeginInit();
this.gbBmsDateTime.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).BeginInit();
@@ -143,31 +157,20 @@
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.TeAntiTheftGyroCurr.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem21)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem20)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAntiTheftGroup)).BeginInit();
this.SuspendLayout();
//
// layoutControl1
//
this.layoutControl1.Controls.Add(this.TeSensitive);
this.layoutControl1.Controls.Add(this.BtnAntiTheftEnable);
this.layoutControl1.Controls.Add(this.BtnClearAntiTheftProtect);
this.layoutControl1.Controls.Add(this.BtnAntiTheftDisable);
this.layoutControl1.Controls.Add(this.gbAntiTheft);
this.layoutControl1.Controls.Add(this.gbBmsDateTime);
this.layoutControl1.Controls.Add(this.gbChaModeControl);
this.layoutControl1.Controls.Add(this.gbCapacityControl);
this.layoutControl1.Controls.Add(this.TeAntiTheftGyroCurr);
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
this.layoutControl1.Name = "layoutControl1";
@@ -177,47 +180,170 @@
this.layoutControl1.TabIndex = 0;
this.layoutControl1.Text = "layoutControl1";
//
// gbAntiTheft
//
this.gbAntiTheft.Controls.Add(this.layoutControl4);
this.gbAntiTheft.Location = new System.Drawing.Point(2, 212);
this.gbAntiTheft.Name = "gbAntiTheft";
this.gbAntiTheft.Size = new System.Drawing.Size(282, 192);
this.gbAntiTheft.TabIndex = 13;
this.gbAntiTheft.Text = "Anti-Theft";
//
// layoutControl4
//
this.layoutControl4.Controls.Add(this.BtnClearAlarm);
this.layoutControl4.Controls.Add(this.BtnClearActivation);
this.layoutControl4.Controls.Add(this.TeSensitive);
this.layoutControl4.Controls.Add(this.TeAntiTheftGyroCurr);
this.layoutControl4.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl4.Location = new System.Drawing.Point(2, 23);
this.layoutControl4.Name = "layoutControl4";
this.layoutControl4.Root = this.layoutControlGroup4;
this.layoutControl4.Size = new System.Drawing.Size(278, 167);
this.layoutControl4.TabIndex = 0;
this.layoutControl4.Text = "layoutControl4";
//
// TeSensitive
//
this.TeSensitive.Location = new System.Drawing.Point(86, 265);
this.TeSensitive.Location = new System.Drawing.Point(88, 3);
this.TeSensitive.Name = "TeSensitive";
this.TeSensitive.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
this.TeSensitive.Properties.Appearance.Options.UseFont = true;
this.TeSensitive.Properties.Appearance.Options.UseTextOptions = true;
this.TeSensitive.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
this.TeSensitive.Properties.ReadOnly = true;
this.TeSensitive.Size = new System.Drawing.Size(194, 24);
this.TeSensitive.TabIndex = 18;
this.TeSensitive.Size = new System.Drawing.Size(187, 24);
this.TeSensitive.StyleController = this.layoutControl4;
this.TeSensitive.TabIndex = 4;
//
// BtnAntiTheftEnable
// TeAntiTheftGyroCurr
//
this.BtnAntiTheftEnable.Location = new System.Drawing.Point(109, 365);
this.BtnAntiTheftEnable.Name = "BtnAntiTheftEnable";
this.BtnAntiTheftEnable.Size = new System.Drawing.Size(85, 35);
this.BtnAntiTheftEnable.StyleController = this.layoutControl1;
this.BtnAntiTheftEnable.TabIndex = 17;
this.BtnAntiTheftEnable.Text = "Enable";
this.BtnAntiTheftEnable.Click += new System.EventHandler(this.BtnAntiTheftEnable_Click);
this.TeAntiTheftGyroCurr.Location = new System.Drawing.Point(88, 31);
this.TeAntiTheftGyroCurr.Name = "TeAntiTheftGyroCurr";
this.TeAntiTheftGyroCurr.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
this.TeAntiTheftGyroCurr.Properties.Appearance.Options.UseFont = true;
this.TeAntiTheftGyroCurr.Properties.Appearance.Options.UseTextOptions = true;
this.TeAntiTheftGyroCurr.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
this.TeAntiTheftGyroCurr.Properties.ReadOnly = true;
this.TeAntiTheftGyroCurr.Size = new System.Drawing.Size(187, 24);
this.TeAntiTheftGyroCurr.StyleController = this.layoutControl4;
this.TeAntiTheftGyroCurr.TabIndex = 5;
//
// BtnClearAntiTheftProtect
// BtnClearAlarm
//
this.BtnClearAntiTheftProtect.Location = new System.Drawing.Point(6, 365);
this.BtnClearAntiTheftProtect.Name = "BtnClearAntiTheftProtect";
this.BtnClearAntiTheftProtect.Size = new System.Drawing.Size(99, 35);
this.BtnClearAntiTheftProtect.StyleController = this.layoutControl1;
this.BtnClearAntiTheftProtect.TabIndex = 16;
this.BtnClearAntiTheftProtect.Text = "Clear Protect";
this.BtnClearAntiTheftProtect.Click += new System.EventHandler(this.BtnClearAntiTheftProtect_Click);
this.BtnClearAlarm.Location = new System.Drawing.Point(3, 127);
this.BtnClearAlarm.Name = "BtnClearAlarm";
this.BtnClearAlarm.Size = new System.Drawing.Size(133, 37);
this.BtnClearAlarm.StyleController = this.layoutControl4;
this.BtnClearAlarm.TabIndex = 6;
this.BtnClearAlarm.Text = "Clear Alarm";
this.BtnClearAlarm.Click += new System.EventHandler(this.BtnClearAlarm_Click);
//
// BtnAntiTheftDisable
// BtnClearActivation
//
this.BtnAntiTheftDisable.Location = new System.Drawing.Point(198, 365);
this.BtnAntiTheftDisable.Name = "BtnAntiTheftDisable";
this.BtnAntiTheftDisable.Size = new System.Drawing.Size(82, 35);
this.BtnAntiTheftDisable.StyleController = this.layoutControl1;
this.BtnAntiTheftDisable.TabIndex = 15;
this.BtnAntiTheftDisable.Text = "Disable";
this.BtnAntiTheftDisable.Click += new System.EventHandler(this.BtnAntiTheftDisable_Click);
this.BtnClearActivation.Location = new System.Drawing.Point(140, 127);
this.BtnClearActivation.Name = "BtnClearActivation";
this.BtnClearActivation.Size = new System.Drawing.Size(135, 37);
this.BtnClearActivation.StyleController = this.layoutControl4;
this.BtnClearActivation.TabIndex = 7;
this.BtnClearActivation.Text = "Clear Activation";
this.BtnClearActivation.Click += new System.EventHandler(this.BtnClearActivation_Click);
//
// layoutControlGroup4
//
this.layoutControlGroup4.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
this.layoutControlGroup4.GroupBordersVisible = false;
this.layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.layoutControlItem16,
this.layoutControlItem17,
this.simpleLabelItemAntiTheftStatus,
this.emptySpaceItem6,
this.layoutControlItemClearAlarm,
this.layoutControlItemClearActivation});
this.layoutControlGroup4.Name = "layoutControlGroup4";
this.layoutControlGroup4.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
this.layoutControlGroup4.Size = new System.Drawing.Size(278, 167);
this.layoutControlGroup4.TextVisible = false;
//
// layoutControlItem16
//
this.layoutControlItem16.AppearanceItemCaption.Options.UseTextOptions = true;
this.layoutControlItem16.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
this.layoutControlItem16.Control = this.TeSensitive;
this.layoutControlItem16.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem16.MinSize = new System.Drawing.Size(115, 28);
this.layoutControlItem16.Name = "layoutControlItem16";
this.layoutControlItem16.Size = new System.Drawing.Size(276, 28);
this.layoutControlItem16.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem16.Text = " Sensitive";
this.layoutControlItem16.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this.layoutControlItem16.TextSize = new System.Drawing.Size(80, 20);
this.layoutControlItem16.TextToControlDistance = 5;
//
// layoutControlItem17
//
this.layoutControlItem17.AppearanceItemCaption.Options.UseTextOptions = true;
this.layoutControlItem17.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
this.layoutControlItem17.Control = this.TeAntiTheftGyroCurr;
this.layoutControlItem17.Location = new System.Drawing.Point(0, 28);
this.layoutControlItem17.MinSize = new System.Drawing.Size(115, 28);
this.layoutControlItem17.Name = "layoutControlItem17";
this.layoutControlItem17.Size = new System.Drawing.Size(276, 28);
this.layoutControlItem17.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem17.Text = " Status";
this.layoutControlItem17.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this.layoutControlItem17.TextSize = new System.Drawing.Size(80, 20);
this.layoutControlItem17.TextToControlDistance = 5;
//
// simpleLabelItemAntiTheftStatus
//
this.simpleLabelItemAntiTheftStatus.AllowHotTrack = false;
this.simpleLabelItemAntiTheftStatus.AppearanceItemCaption.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.simpleLabelItemAntiTheftStatus.AppearanceItemCaption.ForeColor = System.Drawing.Color.Blue;
this.simpleLabelItemAntiTheftStatus.AppearanceItemCaption.Options.UseFont = true;
this.simpleLabelItemAntiTheftStatus.AppearanceItemCaption.Options.UseForeColor = true;
this.simpleLabelItemAntiTheftStatus.AppearanceItemCaption.Options.UseTextOptions = true;
this.simpleLabelItemAntiTheftStatus.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
this.simpleLabelItemAntiTheftStatus.Location = new System.Drawing.Point(0, 56);
this.simpleLabelItemAntiTheftStatus.MinSize = new System.Drawing.Size(274, 22);
this.simpleLabelItemAntiTheftStatus.Name = "simpleLabelItemAntiTheftStatus";
this.simpleLabelItemAntiTheftStatus.Size = new System.Drawing.Size(276, 22);
this.simpleLabelItemAntiTheftStatus.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.simpleLabelItemAntiTheftStatus.Text = " Waiting for charging activation";
this.simpleLabelItemAntiTheftStatus.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this.simpleLabelItemAntiTheftStatus.TextSize = new System.Drawing.Size(270, 18);
//
// emptySpaceItem6
//
this.emptySpaceItem6.AllowHotTrack = false;
this.emptySpaceItem6.Location = new System.Drawing.Point(0, 78);
this.emptySpaceItem6.MinSize = new System.Drawing.Size(104, 24);
this.emptySpaceItem6.Name = "emptySpaceItem6";
this.emptySpaceItem6.Size = new System.Drawing.Size(276, 46);
this.emptySpaceItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.emptySpaceItem6.TextSize = new System.Drawing.Size(0, 0);
//
// layoutControlItemClearAlarm
//
this.layoutControlItemClearAlarm.Control = this.BtnClearAlarm;
this.layoutControlItemClearAlarm.Location = new System.Drawing.Point(0, 124);
this.layoutControlItemClearAlarm.MinSize = new System.Drawing.Size(80, 35);
this.layoutControlItemClearAlarm.Name = "layoutControlItemClearAlarm";
this.layoutControlItemClearAlarm.Size = new System.Drawing.Size(137, 41);
this.layoutControlItemClearAlarm.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItemClearAlarm.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItemClearAlarm.TextVisible = false;
//
// layoutControlItemClearActivation
//
this.layoutControlItemClearActivation.Control = this.BtnClearActivation;
this.layoutControlItemClearActivation.Location = new System.Drawing.Point(137, 124);
this.layoutControlItemClearActivation.MinSize = new System.Drawing.Size(80, 35);
this.layoutControlItemClearActivation.Name = "layoutControlItemClearActivation";
this.layoutControlItemClearActivation.Size = new System.Drawing.Size(139, 41);
this.layoutControlItemClearActivation.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItemClearActivation.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItemClearActivation.TextVisible = false;
//
// gbBmsDateTime
//
@@ -770,19 +896,6 @@
this.simpleLabelItem2.Text = " %";
this.simpleLabelItem2.TextSize = new System.Drawing.Size(19, 14);
//
// TeAntiTheftGyroCurr
//
this.TeAntiTheftGyroCurr.Location = new System.Drawing.Point(86, 237);
this.TeAntiTheftGyroCurr.Name = "TeAntiTheftGyroCurr";
this.TeAntiTheftGyroCurr.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
this.TeAntiTheftGyroCurr.Properties.Appearance.Options.UseFont = true;
this.TeAntiTheftGyroCurr.Properties.Appearance.Options.UseTextOptions = true;
this.TeAntiTheftGyroCurr.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
this.TeAntiTheftGyroCurr.Properties.ReadOnly = true;
this.TeAntiTheftGyroCurr.Size = new System.Drawing.Size(194, 24);
this.TeAntiTheftGyroCurr.StyleController = this.layoutControl1;
this.TeAntiTheftGyroCurr.TabIndex = 13;
//
// layoutControlGroup1
//
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
@@ -793,7 +906,7 @@
this.layoutControlItem4,
this.layoutControlItem8,
this.emptySpaceItem5,
this.layoutControlGroup3});
this.layoutControlItemAntiTheftGroup});
this.layoutControlGroup1.Name = "Root";
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
this.layoutControlGroup1.Size = new System.Drawing.Size(838, 406);
@@ -841,90 +954,17 @@
this.emptySpaceItem5.Size = new System.Drawing.Size(552, 196);
this.emptySpaceItem5.TextSize = new System.Drawing.Size(0, 0);
//
// layoutControlGroup3
// layoutControlItemAntiTheftGroup
//
this.layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.emptySpaceItem6,
this.layoutControlItem17,
this.layoutControlItem21,
this.layoutControlItem20,
this.layoutControlItem15,
this.layoutControlItem16});
this.layoutControlGroup3.Location = new System.Drawing.Point(0, 210);
this.layoutControlGroup3.Name = "layoutControlGroup3";
this.layoutControlGroup3.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
this.layoutControlGroup3.Size = new System.Drawing.Size(286, 196);
this.layoutControlGroup3.Text = "Anti-Theft";
//
// emptySpaceItem6
//
this.emptySpaceItem6.AllowHotTrack = false;
this.emptySpaceItem6.Location = new System.Drawing.Point(0, 56);
this.emptySpaceItem6.Name = "emptySpaceItem6";
this.emptySpaceItem6.Size = new System.Drawing.Size(278, 72);
this.emptySpaceItem6.TextSize = new System.Drawing.Size(0, 0);
//
// layoutControlItem17
//
this.layoutControlItem17.Control = this.TeAntiTheftGyroCurr;
this.layoutControlItem17.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
this.layoutControlItem17.CustomizationFormText = " Gyro-Scope Curr";
this.layoutControlItem17.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem17.MaxSize = new System.Drawing.Size(0, 28);
this.layoutControlItem17.MinSize = new System.Drawing.Size(134, 28);
this.layoutControlItem17.Name = "layoutControlItem17";
this.layoutControlItem17.Size = new System.Drawing.Size(278, 28);
this.layoutControlItem17.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem17.Text = " Gyro Scope";
this.layoutControlItem17.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this.layoutControlItem17.TextSize = new System.Drawing.Size(75, 20);
this.layoutControlItem17.TextToControlDistance = 5;
//
// layoutControlItem21
//
this.layoutControlItem21.Control = this.BtnAntiTheftDisable;
this.layoutControlItem21.Location = new System.Drawing.Point(192, 128);
this.layoutControlItem21.MinSize = new System.Drawing.Size(30, 26);
this.layoutControlItem21.Name = "layoutControlItem21";
this.layoutControlItem21.Size = new System.Drawing.Size(86, 39);
this.layoutControlItem21.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem21.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem21.TextVisible = false;
//
// layoutControlItem20
//
this.layoutControlItem20.Control = this.BtnClearAntiTheftProtect;
this.layoutControlItem20.Location = new System.Drawing.Point(0, 128);
this.layoutControlItem20.MinSize = new System.Drawing.Size(30, 26);
this.layoutControlItem20.Name = "layoutControlItem20";
this.layoutControlItem20.Size = new System.Drawing.Size(103, 39);
this.layoutControlItem20.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem20.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem20.TextVisible = false;
//
// layoutControlItem15
//
this.layoutControlItem15.Control = this.BtnAntiTheftEnable;
this.layoutControlItem15.Location = new System.Drawing.Point(103, 128);
this.layoutControlItem15.MinSize = new System.Drawing.Size(30, 26);
this.layoutControlItem15.Name = "layoutControlItem15";
this.layoutControlItem15.Size = new System.Drawing.Size(89, 39);
this.layoutControlItem15.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem15.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem15.TextVisible = false;
//
// layoutControlItem16
//
this.layoutControlItem16.Control = this.TeSensitive;
this.layoutControlItem16.Location = new System.Drawing.Point(0, 28);
this.layoutControlItem16.MinSize = new System.Drawing.Size(178, 28);
this.layoutControlItem16.Name = "layoutControlItem16";
this.layoutControlItem16.Size = new System.Drawing.Size(278, 28);
this.layoutControlItem16.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem16.Text = " Sensitive";
this.layoutControlItem16.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this.layoutControlItem16.TextSize = new System.Drawing.Size(75, 14);
this.layoutControlItem16.TextToControlDistance = 5;
this.layoutControlItemAntiTheftGroup.Control = this.gbAntiTheft;
this.layoutControlItemAntiTheftGroup.Location = new System.Drawing.Point(0, 210);
this.layoutControlItemAntiTheftGroup.MaxSize = new System.Drawing.Size(286, 196);
this.layoutControlItemAntiTheftGroup.MinSize = new System.Drawing.Size(286, 196);
this.layoutControlItemAntiTheftGroup.Name = "layoutControlItemAntiTheftGroup";
this.layoutControlItemAntiTheftGroup.Size = new System.Drawing.Size(286, 196);
this.layoutControlItemAntiTheftGroup.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItemAntiTheftGroup.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItemAntiTheftGroup.TextVisible = false;
//
// ucCalibration
//
@@ -935,7 +975,19 @@
this.Size = new System.Drawing.Size(838, 406);
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gbAntiTheft)).EndInit();
this.gbAntiTheft.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControl4)).EndInit();
this.layoutControl4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.TeSensitive.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.TeAntiTheftGyroCurr.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItemAntiTheftStatus)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemClearAlarm)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemClearActivation)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gbBmsDateTime)).EndInit();
this.gbBmsDateTime.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).EndInit();
@@ -984,19 +1036,12 @@
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.TeAntiTheftGyroCurr.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem21)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem20)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAntiTheftGroup)).EndInit();
this.ResumeLayout(false);
}
@@ -1055,17 +1100,20 @@
private DevExpress.XtraEditors.TextEdit TeChgModeValueNew;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14;
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem5;
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3;
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem6;
private DevExpress.XtraEditors.TextEdit TeAntiTheftGyroCurr;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17;
private DevExpress.XtraEditors.SimpleButton BtnAntiTheftDisable;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem21;
private DevExpress.XtraEditors.SimpleButton BtnClearAntiTheftProtect;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem20;
private DevExpress.XtraEditors.SimpleButton BtnAntiTheftEnable;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15;
private DevExpress.XtraEditors.GroupControl gbAntiTheft;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItemAntiTheftGroup;
private DevExpress.XtraLayout.LayoutControl layoutControl4;
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4;
private DevExpress.XtraEditors.TextEdit TeSensitive;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16;
private DevExpress.XtraEditors.TextEdit TeAntiTheftGyroCurr;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17;
private DevExpress.XtraLayout.SimpleLabelItem simpleLabelItemAntiTheftStatus;
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem6;
private DevExpress.XtraEditors.SimpleButton BtnClearAlarm;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItemClearAlarm;
private DevExpress.XtraEditors.SimpleButton BtnClearActivation;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItemClearActivation;
}
}

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
@@ -133,15 +133,17 @@ namespace LFP_Manager.Controls
TeCurrDateTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", SystemData.BmsDateTime);
// Anti-Theft Data Display
TeSensitive.Text = string.Format("{0}", SystemData.CalibriationData.AntiTheft.GyroScope);
TeAntiTheftGyroCurr.Text = string.Format("{0}", SystemData.CalibriationData.AntiTheft.Status);
if (SystemData.CalibriationData.AntiTheft.GyroScope == 0)
{
TeAntiTheftGyroCurr.Text = "DISABLE";
simpleLabelItemAntiTheftStatus.Text = "DISABLE";
}
else
{
TeAntiTheftGyroCurr.Text = "ENABLE";
simpleLabelItemAntiTheftStatus.Text = csConstData.SystemInfo.GetAntiTheftStatusString(SystemData.CalibriationData.AntiTheft.Status);
}
TeSensitive.Text = string.Format("{0}", SystemData.CalibriationData.AntiTheft.GyroScope);
if (dFlag == 0)
{
@@ -218,9 +220,9 @@ namespace LFP_Manager.Controls
{
TeNewDateTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now);
}
private void BtnClearAntiTheftProtect_Click(object sender, EventArgs e)
private void BtnClearAlarm_Click(object sender, EventArgs e)
{
// Anti Theft Data Clear
// Anti Theft Clear Alarm (Send 1 to 0x0089)
PasswordResult = 0;
foreach (Form frm in Application.OpenForms)
@@ -239,7 +241,34 @@ namespace LFP_Manager.Controls
if (PasswordResult == 1)
{
wCalib = rCalib.DeepCopy();
wCalib.AntiTheft.GyroScope = Config.GyroSensitive;
wCalib.AntiTheft.GyroScope = 1;
OnCommnadEvent(19, CALC_INDEX, 1, ref rParam, ref wCalib);
}
}
private void BtnClearActivation_Click(object sender, EventArgs e)
{
// Anti Theft Clear Activation (Set Sensitive to 0)
PasswordResult = 0;
foreach (Form frm in Application.OpenForms)
{
if (frm.Name == "FmxPassword")
{
frm.Activate();
return;
}
}
FmxPassword PasswordForm = new FmxPassword(Config, 0);
PasswordForm.OnResult += PassWordResultProc;
PasswordForm.ShowDialog();
if (PasswordResult == 1)
{
wCalib = rCalib.DeepCopy();
wCalib.AntiTheft.GyroScope = 0;
OnCommnadEvent(19, CALC_INDEX, 1, ref rParam, ref wCalib);
}
@@ -249,62 +278,6 @@ namespace LFP_Manager.Controls
{
PasswordResult = result;
}
private void BtnAntiTheftEnable_Click(object sender, EventArgs e)
{
// Anti Theft Data Get
PasswordResult = 0;
foreach (Form frm in Application.OpenForms)
{
if (frm.Name == "FmxPassword")
{
frm.Activate();
return;
}
}
FmxPassword PasswordForm = new FmxPassword(Config, 1);
PasswordForm.OnResult += PassWordResultProc;
PasswordForm.ShowDialog();
if (PasswordResult == 1)
{
wCalib = rCalib.DeepCopy();
wCalib.AntiTheft.GyroScope = Config.GyroSensitive;
OnCommnadEvent(18, CALC_INDEX, 1, ref rParam, ref wCalib);
}
}
private void BtnAntiTheftDisable_Click(object sender, EventArgs e)
{
// Anti Theft Data Get
PasswordResult = 0;
foreach (Form frm in Application.OpenForms)
{
if (frm.Name == "FmxPassword")
{
frm.Activate();
return;
}
}
FmxPassword PasswordForm = new FmxPassword(Config, 2);
PasswordForm.OnResult += PassWordResultProc;
PasswordForm.ShowDialog();
if (PasswordResult == 1)
{
wCalib = rCalib.DeepCopy();
wCalib.AntiTheft.GyroScope = 0;
OnCommnadEvent(18, CALC_INDEX, 1, ref rParam, ref wCalib);
}
}
#endregion
#region COMPONENT EVENT

View File

@@ -1,4 +1,4 @@
namespace LFP_Manager.Controls
namespace LFP_Manager.Controls
{
partial class ucEventLog
{
@@ -32,6 +32,7 @@
this.gcLogging = new DevExpress.XtraEditors.GroupControl();
this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl();
this.cbPacketLog = new DevExpress.XtraEditors.CheckEdit();
this.btnAnalyzer = new DevExpress.XtraEditors.SimpleButton();
this.btnLogClear = new DevExpress.XtraEditors.SimpleButton();
this.tabDataLog = new DevExpress.XtraTab.XtraTabControl();
this.tpDataLog = new DevExpress.XtraTab.XtraTabPage();
@@ -39,8 +40,9 @@
this.meDataLog = new DevExpress.XtraEditors.MemoEdit();
this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
this.lcCheckEdit = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItemAnalyzer = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
@@ -58,8 +60,9 @@
((System.ComponentModel.ISupportInitialize)(this.meDataLog.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.lcCheckEdit)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAnalyzer)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
this.SuspendLayout();
@@ -90,6 +93,7 @@
//
this.layoutControl2.AllowCustomization = false;
this.layoutControl2.Controls.Add(this.cbPacketLog);
this.layoutControl2.Controls.Add(this.btnAnalyzer);
this.layoutControl2.Controls.Add(this.btnLogClear);
this.layoutControl2.Controls.Add(this.tabDataLog);
this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -110,11 +114,21 @@
this.cbPacketLog.StyleController = this.layoutControl2;
this.cbPacketLog.TabIndex = 6;
//
// btnAnalyzer
//
this.btnAnalyzer.Location = new System.Drawing.Point(702, 28);
this.btnAnalyzer.Name = "btnAnalyzer";
this.btnAnalyzer.Size = new System.Drawing.Size(83, 50);
this.btnAnalyzer.StyleController = this.layoutControl2;
this.btnAnalyzer.TabIndex = 7;
this.btnAnalyzer.Text = "Analyzer";
this.btnAnalyzer.Click += new System.EventHandler(this.btnAnalyzer_Click);
//
// btnLogClear
//
this.btnLogClear.Location = new System.Drawing.Point(702, 28);
this.btnLogClear.Location = new System.Drawing.Point(702, 82);
this.btnLogClear.Name = "btnLogClear";
this.btnLogClear.Size = new System.Drawing.Size(83, 110);
this.btnLogClear.Size = new System.Drawing.Size(83, 56);
this.btnLogClear.StyleController = this.layoutControl2;
this.btnLogClear.TabIndex = 5;
this.btnLogClear.Text = "Clear";
@@ -162,8 +176,9 @@
this.layoutControlGroup2.GroupBordersVisible = false;
this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.layoutControlItem6,
this.layoutControlItem14,
this.lcCheckEdit});
this.lcCheckEdit,
this.layoutControlItemAnalyzer,
this.layoutControlItem14});
this.layoutControlGroup2.Name = "layoutControlGroup2";
this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
this.layoutControlGroup2.Size = new System.Drawing.Size(789, 142);
@@ -181,18 +196,6 @@
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem6.TextVisible = false;
//
// layoutControlItem14
//
this.layoutControlItem14.Control = this.btnLogClear;
this.layoutControlItem14.CustomizationFormText = "layoutControlItem14";
this.layoutControlItem14.Location = new System.Drawing.Point(698, 24);
this.layoutControlItem14.MinSize = new System.Drawing.Size(60, 26);
this.layoutControlItem14.Name = "layoutControlItem14";
this.layoutControlItem14.Size = new System.Drawing.Size(87, 114);
this.layoutControlItem14.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem14.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem14.TextVisible = false;
//
// lcCheckEdit
//
this.lcCheckEdit.Control = this.cbPacketLog;
@@ -205,6 +208,30 @@
this.lcCheckEdit.TextSize = new System.Drawing.Size(0, 0);
this.lcCheckEdit.TextVisible = false;
//
// layoutControlItemAnalyzer
//
this.layoutControlItemAnalyzer.Control = this.btnAnalyzer;
this.layoutControlItemAnalyzer.CustomizationFormText = "layoutControlItemAnalyzer";
this.layoutControlItemAnalyzer.Location = new System.Drawing.Point(698, 24);
this.layoutControlItemAnalyzer.MinSize = new System.Drawing.Size(60, 26);
this.layoutControlItemAnalyzer.Name = "layoutControlItemAnalyzer";
this.layoutControlItemAnalyzer.Size = new System.Drawing.Size(87, 54);
this.layoutControlItemAnalyzer.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItemAnalyzer.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItemAnalyzer.TextVisible = false;
//
// layoutControlItem14
//
this.layoutControlItem14.Control = this.btnLogClear;
this.layoutControlItem14.CustomizationFormText = "layoutControlItem14";
this.layoutControlItem14.Location = new System.Drawing.Point(698, 78);
this.layoutControlItem14.MinSize = new System.Drawing.Size(60, 26);
this.layoutControlItem14.Name = "layoutControlItem14";
this.layoutControlItem14.Size = new System.Drawing.Size(87, 60);
this.layoutControlItem14.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem14.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem14.TextVisible = false;
//
// layoutControlGroup1
//
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
@@ -249,8 +276,9 @@
((System.ComponentModel.ISupportInitialize)(this.meDataLog.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.lcCheckEdit)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAnalyzer)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
this.ResumeLayout(false);
@@ -263,6 +291,7 @@
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
private DevExpress.XtraEditors.GroupControl gcLogging;
private DevExpress.XtraLayout.LayoutControl layoutControl2;
private DevExpress.XtraEditors.SimpleButton btnAnalyzer;
private DevExpress.XtraEditors.SimpleButton btnLogClear;
private DevExpress.XtraTab.XtraTabControl tabDataLog;
private DevExpress.XtraTab.XtraTabPage tpDataLog;
@@ -270,6 +299,7 @@
private DevExpress.XtraEditors.MemoEdit meDataLog;
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItemAnalyzer;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
private DevExpress.XtraEditors.CheckEdit cbPacketLog;

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
@@ -23,6 +23,8 @@ namespace LFP_Manager.Controls
#region PUBLIC UPDATE
public event EventHandler OnPacketAnalyzerClick = null;
public void EventUpdate(string aEvent)
{
if (this.InvokeRequired)
@@ -44,6 +46,11 @@ namespace LFP_Manager.Controls
#region ENVENT
private void btnAnalyzer_Click(object sender, EventArgs e)
{
OnPacketAnalyzerClick?.Invoke(this, EventArgs.Empty);
}
private void btnLogClear_Click(object sender, EventArgs e)
{
meDataLog.Text = "";

View File

@@ -466,7 +466,8 @@ namespace LFP_Manager.Controls
private string GetOpStatusDisplayText(short val)
{
switch ((ushort)val)
ushort uval = (ushort)(val & 0x7FFF);
switch (uval)
{
case 0x0000: return "STANDBY (0x0000)";
case 0x0001: return "CHARGING (0x0001)";
@@ -475,12 +476,7 @@ namespace LFP_Manager.Controls
case 0x0004: return "TRIP (0x0004)";
case 0x0008: return "CHG-LIMIT (0x0008)";
case 0x0032: return "POWER-ON (0x0032)";
case 0x8000: return "STANDBY-HEAT (0x8000)";
case 0x8001: return "CHARGING-HEAT (0x8001)";
case 0x8002: return "DISCHARGING-HEAT (0x8002)";
case 0x8004: return "TRIP-HEAT (0x8004)";
case 0x8008: return "CHG-LIMIT-HEAT (0x8008)";
default: return string.Format("UNKNOWN (0x{0:X4})", (ushort)val);
default: return string.Format("UNKNOWN (0x{0:X4})", uval);
}
}

View File

@@ -689,7 +689,7 @@ namespace LFP_Manager.Controls
{
if (SystemData.ShelfCommFail == false)
{
switch ((int)SystemData.StatusData.status)
switch ((int)SystemData.StatusData.status & 0x7FFF)
{
case 0x0000: // Stand by
lbStatus.Text = "STANDBY";
@@ -719,28 +719,8 @@ namespace LFP_Manager.Controls
lbStatus.Text = "CHG-LIMIT";
lbStatus.ForeColor = System.Drawing.Color.Blue;
break;
case 0x8000: // Stand by - Heat
lbStatus.Text = "STANDBY-HEAT";
lbStatus.ForeColor = System.Drawing.Color.Blue;
break;
case 0x8001: // Charging
lbStatus.Text = "CHARGING-HEAT";
lbStatus.ForeColor = System.Drawing.Color.Blue;
break;
case 0x8002: // Discharging
lbStatus.Text = "DISCHARGING-HEAT";
lbStatus.ForeColor = System.Drawing.Color.Magenta;
break;
case 0x8004: // TRIP
lbStatus.Text = "TRIP-HEAT";
lbStatus.ForeColor = System.Drawing.Color.Red;
break;
case 0x8008: // Chg-Lmt
lbStatus.Text = "CHG-LIMIT-HEAT";
lbStatus.ForeColor = System.Drawing.Color.Blue;
break;
default:
lbStatus.Text = string.Format("UNKNOWN(0x{0:X4})", (ushort)SystemData.StatusData.status);
lbStatus.Text = string.Format("UNKNOWN(0x{0:X4})", (ushort)(SystemData.StatusData.status & 0x7FFF));
lbStatus.ForeColor = System.Drawing.Color.Black;
break;
}
@@ -842,7 +822,8 @@ namespace LFP_Manager.Controls
private void DisplayAlarm()
{
gbAlarm.Text = string.Format("Alarm && Fault ( ERROR: 0x{0:X4} )", (ushort)SystemData.StatusData.errorCode);
string chgWaitStr = (((ushort)SystemData.StatusData.status & 0x8000) == 0) ? " - Wait for Charging" : "";
gbAlarm.Text = string.Format("Alarm && Fault ( ERROR: 0x{0:X4} ){1}", (ushort)SystemData.StatusData.errorCode, chgWaitStr);
bool[] aFault = csUtils.Int16ToBitArray(SystemData.StatusData.protection);
bool[] aWarining = csUtils.Int16ToBitArray(SystemData.StatusData.warning);