fix INIT - Overload time fix for OptoTelegramRawTest

This commit is contained in:
2026-07-02 23:24:00 +02:00
parent b0581d81ef
commit 92f63e744d
3 changed files with 7 additions and 4 deletions
@@ -230,7 +230,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.common
// ---------- VOLUME UNWRAP ----------
double v = VolumeRaw;
if (double.IsNaN(volumeRawExtLast))
if (counter == 0 || double.IsNaN(volumeRawExtLast))
{
VolumeRawExt = volumeRawExtLast = v;
}
@@ -249,7 +249,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.common
}
// ---------- TIMESTAMP UNWRAP (seconds) ----------
if (double.IsNaN(timestampExtLast))
if (counter == 0 || double.IsNaN(timestampExtLast))
{
TimestampExt = timestampExtLast = ts;
}
@@ -991,6 +991,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
endTelegramIdx[i] = 0;
}
TestEndTelegramIx = 0;
volumeRawExtLast = double.NaN;
timestampExtLast = double.NaN;
if (optoSerialPort != null && optoSerialPort.IsOpen) optoSerialPort.DiscardInBuffer();