Fix Send gauges showing intensity, zero when idle
- Send gauges now show waveform intensity (0-100) not strength ceiling - State.LastIntensityA/B tracks average intensity per tick - Zero when no pattern/stream active (was 25 due to IntensityOff 101 sentinel) - Recv gauges unchanged (device-reported strength 0-200)
This commit is contained in:
+4
-4
@@ -142,7 +142,7 @@ public class MainForm : Form
|
||||
Location = new Point(72, 160),
|
||||
Size = new Size(332, 20),
|
||||
Minimum = 0,
|
||||
Maximum = 200,
|
||||
Maximum = 100,
|
||||
Style = ProgressBarStyle.Continuous
|
||||
};
|
||||
_lblSendB = new Label
|
||||
@@ -157,7 +157,7 @@ public class MainForm : Form
|
||||
Location = new Point(72, 184),
|
||||
Size = new Size(332, 20),
|
||||
Minimum = 0,
|
||||
Maximum = 200,
|
||||
Maximum = 100,
|
||||
Style = ProgressBarStyle.Continuous
|
||||
};
|
||||
_lblRecvA = new Label
|
||||
@@ -357,8 +357,8 @@ public class MainForm : Form
|
||||
_lblBle.Text = _device.IsConnected
|
||||
? $"BLE: connected ({_device.DeviceName})"
|
||||
: "BLE: disconnected";
|
||||
_gaugeSendA.Value = Math.Clamp(_state.LastSentA, 0, 200);
|
||||
_gaugeSendB.Value = Math.Clamp(_state.LastSentB, 0, 200);
|
||||
_gaugeSendA.Value = Math.Clamp(_state.LastIntensityA, 0, 100);
|
||||
_gaugeSendB.Value = Math.Clamp(_state.LastIntensityB, 0, 100);
|
||||
_gaugeRecvA.Value = Math.Clamp(_device.StrengthA, 0, 200);
|
||||
_gaugeRecvB.Value = Math.Clamp(_device.StrengthB, 0, 200);
|
||||
_btnTest.Enabled = !_server.HasClient && !IsTestRunning;
|
||||
|
||||
Reference in New Issue
Block a user