GTB: - QS tools, clean fields on re-connect

This commit is contained in:
Thomas Wiedebusch 2025-10-21 15:21:57 +02:00
parent f5036dcd67
commit 391359ab33
2 changed files with 34 additions and 19 deletions

View File

@ -50,7 +50,7 @@
this.tbxRegion = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.tbxMeterFw = new System.Windows.Forms.TextBox();
this.tbxMeterMeterSize = new System.Windows.Forms.TextBox();
this.tbxMeterSize = new System.Windows.Forms.TextBox();
this.tbxMeterLutCrc = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
@ -68,7 +68,7 @@
this.tbxStorageMonths = new System.Windows.Forms.TextBox();
this.lblStorageMonths = new System.Windows.Forms.Label();
this.tbxDrainedBatteryLoad_percent = new System.Windows.Forms.TextBox();
this.tBxRemainingLifeTimeSw = new System.Windows.Forms.TextBox();
this.tbxRemainingLifeTimeSw = new System.Windows.Forms.TextBox();
this.tbxRemainingLifeTimeFw = new System.Windows.Forms.TextBox();
this.lblRemainingLifeTimeSw = new System.Windows.Forms.Label();
this.lblRemainingLifetimeFw = new System.Windows.Forms.Label();
@ -296,11 +296,11 @@
//
// tbxMeterMeterSize
//
this.tbxMeterMeterSize.Location = new System.Drawing.Point(141, 66);
this.tbxMeterMeterSize.Name = "tbxMeterMeterSize";
this.tbxMeterMeterSize.ReadOnly = true;
this.tbxMeterMeterSize.Size = new System.Drawing.Size(146, 20);
this.tbxMeterMeterSize.TabIndex = 30;
this.tbxMeterSize.Location = new System.Drawing.Point(141, 66);
this.tbxMeterSize.Name = "tbxMeterSize";
this.tbxMeterSize.ReadOnly = true;
this.tbxMeterSize.Size = new System.Drawing.Size(146, 20);
this.tbxMeterSize.TabIndex = 30;
//
// tbxMeterLutCrc
//
@ -446,11 +446,11 @@
//
// tBxRemainingLifeTimeSw
//
this.tBxRemainingLifeTimeSw.Location = new System.Drawing.Point(170, 75);
this.tBxRemainingLifeTimeSw.Name = "tBxRemainingLifeTimeSw";
this.tBxRemainingLifeTimeSw.ReadOnly = true;
this.tBxRemainingLifeTimeSw.Size = new System.Drawing.Size(116, 20);
this.tBxRemainingLifeTimeSw.TabIndex = 66;
this.tbxRemainingLifeTimeSw.Location = new System.Drawing.Point(170, 75);
this.tbxRemainingLifeTimeSw.Name = "tbxRemainingLifeTimeSw";
this.tbxRemainingLifeTimeSw.ReadOnly = true;
this.tbxRemainingLifeTimeSw.Size = new System.Drawing.Size(116, 20);
this.tbxRemainingLifeTimeSw.TabIndex = 66;
//
// tbxRemainingLifeTimeFw
//
@ -496,7 +496,7 @@
this.grpBoxStatistic.Controls.Add(this.lblRemainingLifeTimeSw);
this.grpBoxStatistic.Controls.Add(this.tbxDrainedBatteryLoad_percent);
this.grpBoxStatistic.Controls.Add(this.tbxRemainingLifeTimeFw);
this.grpBoxStatistic.Controls.Add(this.tBxRemainingLifeTimeSw);
this.grpBoxStatistic.Controls.Add(this.tbxRemainingLifeTimeSw);
this.grpBoxStatistic.Location = new System.Drawing.Point(324, 53);
this.grpBoxStatistic.Name = "grpBoxStatistic";
this.grpBoxStatistic.Size = new System.Drawing.Size(307, 136);
@ -511,7 +511,7 @@
this.grpBoxCordonelReadout.Controls.Add(this.label5);
this.grpBoxCordonelReadout.Controls.Add(this.tbxMeterLutCrc);
this.grpBoxCordonelReadout.Controls.Add(this.tbxInitialBatteryLoad);
this.grpBoxCordonelReadout.Controls.Add(this.tbxMeterMeterSize);
this.grpBoxCordonelReadout.Controls.Add(this.tbxMeterSize);
this.grpBoxCordonelReadout.Controls.Add(this.tbxMeterFw);
this.grpBoxCordonelReadout.Controls.Add(this.lblBatteryMilliAHrRating);
this.grpBoxCordonelReadout.Controls.Add(this.label8);
@ -599,7 +599,7 @@
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox tbxPcbId;
private System.Windows.Forms.TextBox tbxMeterFw;
private System.Windows.Forms.TextBox tbxMeterMeterSize;
private System.Windows.Forms.TextBox tbxMeterSize;
private System.Windows.Forms.TextBox tbxMeterLutCrc;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
@ -621,7 +621,7 @@
private System.Windows.Forms.TextBox tbxStorageMonths;
private System.Windows.Forms.Label lblStorageMonths;
private System.Windows.Forms.TextBox tbxDrainedBatteryLoad_percent;
private System.Windows.Forms.TextBox tBxRemainingLifeTimeSw;
private System.Windows.Forms.TextBox tbxRemainingLifeTimeSw;
private System.Windows.Forms.TextBox tbxRemainingLifeTimeFw;
private System.Windows.Forms.Label lblRemainingLifeTimeSw;
private System.Windows.Forms.Label lblRemainingLifetimeFw;

View File

@ -85,6 +85,21 @@ namespace Xylem.Common.Ui.GenesisToolBox
lblConnectPcb.ForeColor = Color.Red;
lblWaitingForMeterResponse.Visible = false;
tbxMeterFw.Text = "";
tbxMeterLutCrc.Text = "";
tbxMeterSize.Text = "";
tbxRegion.Text = "";
tbxDateTime.Text = "";
tbxRadio.Text = "";
tbxExpiredLifeTime.Text = "";
tbxDrainedLoad_uAs.Text = "";
tbxBatteries.Text = "";
tbxInitialBatteryLoad.Text = "";
tbxDrainedBatteryLoad_percent.Text = "";
tbxRemainingLifeTimeFw.Text = "";
tbxRemainingLifeTimeSw.Text = "";
tbxStorageMonths.Text = "";
SetCordonelAccessLocked();
tbxPcbId.Visible = false;
btnConnect.Focus();
@ -274,7 +289,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
tbxPcbId.Text = _currentGenesis.PcbId;
tbxPcbId.Visible = true;
tbxMeterFw.Text = _currentGenesis.FwVersion;
tbxMeterMeterSize.Text = _currentGenesis.MeterSize;
tbxMeterSize.Text = _currentGenesis.MeterSize;
tbxMeterLutCrc.Text = _currentGenesis.LutCrc;
tbxRegion.Text = _currentGenesis.Region;
LogText("Meter FW Version:\t" + _currentGenesis.FwVersion);
@ -703,7 +718,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
tbxInitialBatteryLoad.Text = $@"{genesisStatus.InitialBatteryLoad_mAh:N0}";
tbxDrainedBatteryLoad_percent.Text = $@"{genesisStatus.DrainedBatteryLoadPercent:F2}";
tBxRemainingLifeTimeSw.Text = $@"{genesisStatus.RemainingLifeTimeYears:F2}";
tbxRemainingLifeTimeSw.Text = $@"{genesisStatus.RemainingLifeTimeYears:F2}";
tbxRemainingLifeTimeFw.Text = genesisStatus.FwCalculatedRemainingLifeTimeYears != null ?
$@"{genesisStatus.FwCalculatedRemainingLifeTimeYears:F2}" : "not supported";
tbxStorageMonths.Text = $@"{genesisStatus.StorageMonths:F1}";
@ -711,7 +726,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
else
{
tbxDrainedBatteryLoad_percent.Text = "";
tBxRemainingLifeTimeSw.Text = "";
tbxRemainingLifeTimeSw.Text = "";
tbxRemainingLifeTimeFw.Text = "";
tbxStorageMonths.Text = "";
tbxBatteries.Text = "";