Develop - GciBridge -> GCI -> PreadjustmentUI functions 4

This commit is contained in:
2026-05-26 10:51:18 +02:00
parent 9700ba7900
commit c5f52e06fa
6 changed files with 90 additions and 87 deletions
@@ -1414,7 +1414,7 @@ namespace GenesisCordonelInterface.API
private FrmCordonelPreadjustmentUI _preadjustmentForm; private FrmCordonelPreadjustmentUI _preadjustmentForm;
private readonly object _formLock = new object(); private readonly object _formLock = new object();
public event EventHandler PreadjustmentFormClosedByUser; public event EventHandler PreAdjustmentFormClosedByUser;
/// <summary> /// <summary>
/// Shows singleton instance of preadjustment form. /// Shows singleton instance of preadjustment form.
@@ -1456,7 +1456,7 @@ namespace GenesisCordonelInterface.API
/// _bridge.ShowPreadjustmentForm(this); /// _bridge.ShowPreadjustmentForm(this);
/// ///
/// </summary> /// </summary>
public void ShowPreadjustmentForm(IWin32Window owner) public void ShowPreAdjustmentForm(IWin32Window owner)
{ {
lock (_formLock) lock (_formLock)
{ {
@@ -1476,7 +1476,7 @@ namespace GenesisCordonelInterface.API
_preadjustmentForm.Hide(); _preadjustmentForm.Hide();
// Notify outside code that the form was closed by user // Notify outside code that the form was closed by user
PreadjustmentFormClosedByUser?.Invoke( PreAdjustmentFormClosedByUser?.Invoke(
this, this,
EventArgs.Empty); EventArgs.Empty);
} }
@@ -1526,7 +1526,7 @@ namespace GenesisCordonelInterface.API
#region ================================== PreAdjustmentUI DETECT process ================================== #region ================================== PreAdjustmentUI DETECT process ==================================
public Task<PreadjustmentDetectResult> Preadjustment_DetectAsync( public Task<PreadjustmentDetectResult> PreAdjustment_DetectAsync(
CancellationToken token = default) CancellationToken token = default)
{ {
return Task.Run(() => Preadjustment_DetectCore(token), token); return Task.Run(() => Preadjustment_DetectCore(token), token);
@@ -1724,24 +1724,24 @@ namespace GenesisCordonelInterface.API
#endregion #endregion
#region ================================== PreAdjustmentUI PREPARATION process ================================== #region ================================== PreAdjustmentUI PREPARATION process ==================================
public Task<PreadjustmentProcessResult> Preadjustment_PreparationAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_PreparationAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
return GetWorker(slot).RunAsync( return GetWorker(slot).RunAsync(
() => Preadjustment_Preparation(slot, pp), () => PreAdjustment_Preparation(slot, pp),
token); token);
} }
/// <summary> /// <summary>
/// Executes standalone preparation process. /// Executes standalone preparation process.
/// </summary> /// </summary>
public PreadjustmentProcessResult Preadjustment_Preparation( public PreAdjustmentProcessResult PreAdjustment_Preparation(
int slot, int slot,
ProcessProgress pp) ProcessProgress pp)
{ {
const string operation = nameof(Preadjustment_Preparation); const string operation = nameof(PreAdjustment_Preparation);
try try
{ {
@@ -1757,7 +1757,7 @@ namespace GenesisCordonelInterface.API
ExecuteProcess(process, pp); ExecuteProcess(process, pp);
var result = var result =
new PreadjustmentProcessResult new PreAdjustmentProcessResult
{ {
Success = success, Success = success,
Slot = slot, Slot = slot,
@@ -1775,7 +1775,7 @@ namespace GenesisCordonelInterface.API
{ {
LogError(operation, ex); LogError(operation, ex);
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = false, Success = false,
Slot = slot, Slot = slot,
@@ -1813,21 +1813,21 @@ namespace GenesisCordonelInterface.API
#endregion #endregion
#region ================================== PreAdjustmentUI AMPLITUDE TEST process ================================== #region ================================== PreAdjustmentUI AMPLITUDE TEST process ==================================
public Task<PreadjustmentProcessResult> Preadjustment_AmplitudeTestAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_AmplitudeTestAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
return GetWorker(slot).RunAsync( return GetWorker(slot).RunAsync(
() => Preadjustment_AmplitudeTest(slot, pp), () => PreAdjustment_AmplitudeTest(slot, pp),
token); token);
} }
public PreadjustmentProcessResult Preadjustment_AmplitudeTest( public PreAdjustmentProcessResult PreAdjustment_AmplitudeTest(
int slot, int slot,
ProcessProgress pp) ProcessProgress pp)
{ {
const string operation = nameof(Preadjustment_AmplitudeTest); const string operation = nameof(PreAdjustment_AmplitudeTest);
try try
{ {
@@ -1838,7 +1838,7 @@ namespace GenesisCordonelInterface.API
if (pp.Setting.TempOnly) if (pp.Setting.TempOnly)
{ {
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = true, Success = true,
Slot = slot, Slot = slot,
@@ -1852,7 +1852,7 @@ namespace GenesisCordonelInterface.API
LogInfo(operation, $"Finished. Slot={slot}, Success={success}"); LogInfo(operation, $"Finished. Slot={slot}, Success={success}");
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = success, Success = success,
Slot = slot, Slot = slot,
@@ -1864,7 +1864,7 @@ namespace GenesisCordonelInterface.API
{ {
LogError(operation, ex); LogError(operation, ex);
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = false, Success = false,
Slot = slot, Slot = slot,
@@ -1903,22 +1903,22 @@ namespace GenesisCordonelInterface.API
#region ================================== PreAdjustmentUI TEMPERATURE CALIBRATION process ================================== #region ================================== PreAdjustmentUI TEMPERATURE CALIBRATION process ==================================
public Task<PreadjustmentProcessResult> Preadjustment_TemperatureCalibrationAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_TemperatureCalibrationAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
return GetWorker(slot).RunAsync( return GetWorker(slot).RunAsync(
() => Preadjustment_TemperatureCalibration(slot, pp), () => PreAdjustment_TemperatureCalibration(slot, pp),
token); token);
} }
public PreadjustmentProcessResult Preadjustment_TemperatureCalibration( public PreAdjustmentProcessResult PreAdjustment_TemperatureCalibration(
int slot, int slot,
ProcessProgress pp) ProcessProgress pp)
{ {
const string operation = const string operation =
nameof(Preadjustment_TemperatureCalibration); nameof(PreAdjustment_TemperatureCalibration);
try try
{ {
@@ -1936,7 +1936,7 @@ namespace GenesisCordonelInterface.API
ExecuteProcess(process, pp); ExecuteProcess(process, pp);
var result = var result =
new PreadjustmentProcessResult new PreAdjustmentProcessResult
{ {
Success = success, Success = success,
Slot = slot, Slot = slot,
@@ -1954,7 +1954,7 @@ namespace GenesisCordonelInterface.API
{ {
LogError(operation, ex); LogError(operation, ex);
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = false, Success = false,
Slot = slot, Slot = slot,
@@ -1993,22 +1993,22 @@ namespace GenesisCordonelInterface.API
#region ================================== PreAdjustmentUI OFFSET TEST process ================================== #region ================================== PreAdjustmentUI OFFSET TEST process ==================================
public Task<PreadjustmentProcessResult> Preadjustment_OffsetTestAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_OffsetTestAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
return GetWorker(slot).RunAsync( return GetWorker(slot).RunAsync(
() => Preadjustment_OffsetTest(slot, pp), () => PreAdjustment_OffsetTest(slot, pp),
token); token);
} }
public PreadjustmentProcessResult Preadjustment_OffsetTest( public PreAdjustmentProcessResult PreAdjustment_OffsetTest(
int slot, int slot,
ProcessProgress pp) ProcessProgress pp)
{ {
const string operation = const string operation =
nameof(Preadjustment_OffsetTest); nameof(PreAdjustment_OffsetTest);
try try
{ {
@@ -2021,7 +2021,7 @@ namespace GenesisCordonelInterface.API
if (pp.Setting.TempOnly) if (pp.Setting.TempOnly)
{ {
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = true, Success = true,
Slot = slot, Slot = slot,
@@ -2036,7 +2036,7 @@ namespace GenesisCordonelInterface.API
ExecuteProcess(process, pp); ExecuteProcess(process, pp);
var result = var result =
new PreadjustmentProcessResult new PreAdjustmentProcessResult
{ {
Success = success, Success = success,
Slot = slot, Slot = slot,
@@ -2054,7 +2054,7 @@ namespace GenesisCordonelInterface.API
{ {
LogError(operation, ex); LogError(operation, ex);
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = false, Success = false,
Slot = slot, Slot = slot,
@@ -2093,22 +2093,22 @@ namespace GenesisCordonelInterface.API
#region ================================== PreAdjustmentUI COMPLETION process ================================== #region ================================== PreAdjustmentUI COMPLETION process ==================================
public Task<PreadjustmentProcessResult> Preadjustment_CompletionAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_CompletionAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
return GetWorker(slot).RunAsync( return GetWorker(slot).RunAsync(
() => Preadjustment_Completion(slot, pp), () => PreAdjustment_Completion(slot, pp),
token); token);
} }
public PreadjustmentProcessResult Preadjustment_Completion( public PreAdjustmentProcessResult PreAdjustment_Completion(
int slot, int slot,
ProcessProgress pp) ProcessProgress pp)
{ {
const string operation = const string operation =
nameof(Preadjustment_Completion); nameof(PreAdjustment_Completion);
try try
{ {
@@ -2126,7 +2126,7 @@ namespace GenesisCordonelInterface.API
ExecuteProcess(process, pp); ExecuteProcess(process, pp);
var result = var result =
new PreadjustmentProcessResult new PreAdjustmentProcessResult
{ {
Success = success, Success = success,
Slot = slot, Slot = slot,
@@ -2144,7 +2144,7 @@ namespace GenesisCordonelInterface.API
{ {
LogError(operation, ex); LogError(operation, ex);
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = false, Success = false,
Slot = slot, Slot = slot,
@@ -26,7 +26,7 @@ namespace GenesisCordonelInterface.API
_innerMeterAPI = new InterfaceGCIToLaatzen(); _innerMeterAPI = new InterfaceGCIToLaatzen();
} }
// //
#region ================================== PORT DETECTION ================================== #region ================================== PORT DETECTION ==================================
@@ -456,50 +456,53 @@ namespace GenesisCordonelInterface.API
// Preadjustment // Preadjustment
public Task<PreadjustmentDetectResult> Preadjustment_DetectAsync( #region ================================== PreAdjustment ==================================
public Task<PreadjustmentDetectResult> PreAdjustment_DetectAsync(
CancellationToken token = default) CancellationToken token = default)
{ {
return _innerMeterAPI.Preadjustment_DetectAsync(token); return _innerMeterAPI.PreAdjustment_DetectAsync(token);
} }
public Task<PreadjustmentProcessResult> Preadjustment_PreparationAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_PreparationAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
return _innerMeterAPI.Preadjustment_PreparationAsync(slot, pp, token); return _innerMeterAPI.PreAdjustment_PreparationAsync(slot, pp, token);
} }
public Task<PreadjustmentProcessResult> Preadjustment_AmplitudeTestAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_AmplitudeTestAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
return _innerMeterAPI.Preadjustment_AmplitudeTestAsync(slot, pp, token); return _innerMeterAPI.PreAdjustment_AmplitudeTestAsync(slot, pp, token);
} }
public Task<PreadjustmentProcessResult> Preadjustment_TemperatureCalibrationAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_TemperatureCalibrationAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
return _innerMeterAPI.Preadjustment_TemperatureCalibrationAsync(slot, pp, token); return _innerMeterAPI.PreAdjustment_TemperatureCalibrationAsync(slot, pp, token);
} }
public Task<PreadjustmentProcessResult> Preadjustment_OffsetTestAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_OffsetTestAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
return _innerMeterAPI.Preadjustment_OffsetTestAsync(slot, pp, token); return _innerMeterAPI.PreAdjustment_OffsetTestAsync(slot, pp, token);
} }
public Task<PreadjustmentProcessResult> Preadjustment_CompletionAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_CompletionAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
return _innerMeterAPI.Preadjustment_CompletionAsync(slot, pp, token); return _innerMeterAPI.PreAdjustment_CompletionAsync(slot, pp, token);
} }
#endregion
} }
} }
+1 -1
View File
@@ -448,7 +448,7 @@ namespace GenesisCordonelInterface.API
} }
} }
public class PreadjustmentProcessResult public class PreAdjustmentProcessResult
{ {
public bool Success { get; set; } public bool Success { get; set; }
public int Slot { get; set; } public int Slot { get; set; }
+28 -28
View File
@@ -1426,10 +1426,10 @@ namespace TBF.Rig.BridgeComponents.GciBridge
#region ================================== Preadjustment DETECT bridge ================================== #region ================================== Preadjustment DETECT bridge ==================================
public async Task<PreadjustmentDetectResult> Preadjustment_DetectAsync( public async Task<PreadjustmentDetectResult> PreAdjustment_DetectAsync(
CancellationToken token = default) CancellationToken token = default)
{ {
const string operation = nameof(Preadjustment_DetectAsync); const string operation = nameof(PreAdjustment_DetectAsync);
try try
{ {
@@ -1439,7 +1439,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge
PreadjustmentDetectResult result = PreadjustmentDetectResult result =
await gciExternalInterface await gciExternalInterface
.Preadjustment_DetectAsync(token) .PreAdjustment_DetectAsync(token)
.ConfigureAwait(false); .ConfigureAwait(false);
log.InfoFormat( log.InfoFormat(
@@ -1469,12 +1469,12 @@ namespace TBF.Rig.BridgeComponents.GciBridge
#region ================================== PreAdjustment PREPARATION bridge ================================== #region ================================== PreAdjustment PREPARATION bridge ==================================
public async Task<PreadjustmentProcessResult> Preadjustment_PreparationAsync( public async Task<PreAdjustmentProcessResult> PreAdjustment_PreparationAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
const string operation = nameof(Preadjustment_PreparationAsync); const string operation = nameof(PreAdjustment_PreparationAsync);
try try
{ {
@@ -1489,9 +1489,9 @@ namespace TBF.Rig.BridgeComponents.GciBridge
operation, operation,
slot); slot);
PreadjustmentProcessResult result = PreAdjustmentProcessResult result =
await gciExternalInterface await gciExternalInterface
.Preadjustment_PreparationAsync( .PreAdjustment_PreparationAsync(
slot, slot,
pp, pp,
token) token)
@@ -1511,7 +1511,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge
string.Format("{0}: {1} failed.", Name, operation), string.Format("{0}: {1} failed.", Name, operation),
ex); ex);
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = false, Success = false,
Slot = slot, Slot = slot,
@@ -1526,12 +1526,12 @@ namespace TBF.Rig.BridgeComponents.GciBridge
#region ================================== PreAdjustment AMPLITUDE TEST bridge ================================== #region ================================== PreAdjustment AMPLITUDE TEST bridge ==================================
public async Task<PreadjustmentProcessResult> Preadjustment_AmplitudeTestAsync( public async Task<PreAdjustmentProcessResult> PreAdjustment_AmplitudeTestAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
const string operation = nameof(Preadjustment_AmplitudeTestAsync); const string operation = nameof(PreAdjustment_AmplitudeTestAsync);
try try
{ {
@@ -1546,9 +1546,9 @@ namespace TBF.Rig.BridgeComponents.GciBridge
operation, operation,
slot); slot);
PreadjustmentProcessResult result = PreAdjustmentProcessResult result =
await gciExternalInterface await gciExternalInterface
.Preadjustment_AmplitudeTestAsync( .PreAdjustment_AmplitudeTestAsync(
slot, slot,
pp, pp,
token) token)
@@ -1568,7 +1568,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge
string.Format("{0}: {1} failed.", Name, operation), string.Format("{0}: {1} failed.", Name, operation),
ex); ex);
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = false, Success = false,
Slot = slot, Slot = slot,
@@ -1582,12 +1582,12 @@ namespace TBF.Rig.BridgeComponents.GciBridge
#region ================================== PreAdjustment TEMPERATURE CALIBRATION bridge ================================== #region ================================== PreAdjustment TEMPERATURE CALIBRATION bridge ==================================
public async Task<PreadjustmentProcessResult> Preadjustment_TemperatureCalibrationAsync( public async Task<PreAdjustmentProcessResult> PreAdjustment_TemperatureCalibrationAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
const string operation = nameof(Preadjustment_TemperatureCalibrationAsync); const string operation = nameof(PreAdjustment_TemperatureCalibrationAsync);
try try
{ {
@@ -1602,9 +1602,9 @@ namespace TBF.Rig.BridgeComponents.GciBridge
operation, operation,
slot); slot);
PreadjustmentProcessResult result = PreAdjustmentProcessResult result =
await gciExternalInterface await gciExternalInterface
.Preadjustment_TemperatureCalibrationAsync( .PreAdjustment_TemperatureCalibrationAsync(
slot, slot,
pp, pp,
token) token)
@@ -1624,7 +1624,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge
string.Format("{0}: {1} failed.", Name, operation), string.Format("{0}: {1} failed.", Name, operation),
ex); ex);
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = false, Success = false,
Slot = slot, Slot = slot,
@@ -1639,12 +1639,12 @@ namespace TBF.Rig.BridgeComponents.GciBridge
#region ================================== PreAdjustment OFFSET TEST bridge ================================== #region ================================== PreAdjustment OFFSET TEST bridge ==================================
public async Task<PreadjustmentProcessResult> Preadjustment_OffsetTestAsync( public async Task<PreAdjustmentProcessResult> PreAdjustment_OffsetTestAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
const string operation = nameof(Preadjustment_OffsetTestAsync); const string operation = nameof(PreAdjustment_OffsetTestAsync);
try try
{ {
@@ -1659,9 +1659,9 @@ namespace TBF.Rig.BridgeComponents.GciBridge
operation, operation,
slot); slot);
PreadjustmentProcessResult result = PreAdjustmentProcessResult result =
await gciExternalInterface await gciExternalInterface
.Preadjustment_OffsetTestAsync( .PreAdjustment_OffsetTestAsync(
slot, slot,
pp, pp,
token) token)
@@ -1681,7 +1681,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge
string.Format("{0}: {1} failed.", Name, operation), string.Format("{0}: {1} failed.", Name, operation),
ex); ex);
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = false, Success = false,
Slot = slot, Slot = slot,
@@ -1696,12 +1696,12 @@ namespace TBF.Rig.BridgeComponents.GciBridge
#region ================================== PreAdjustment COMPLETION bridge ================================== #region ================================== PreAdjustment COMPLETION bridge ==================================
public async Task<PreadjustmentProcessResult> Preadjustment_CompletionAsync( public async Task<PreAdjustmentProcessResult> PreAdjustment_CompletionAsync(
int slot, int slot,
ProcessProgress pp, ProcessProgress pp,
CancellationToken token = default) CancellationToken token = default)
{ {
const string operation = nameof(Preadjustment_CompletionAsync); const string operation = nameof(PreAdjustment_CompletionAsync);
try try
{ {
@@ -1716,9 +1716,9 @@ namespace TBF.Rig.BridgeComponents.GciBridge
operation, operation,
slot); slot);
PreadjustmentProcessResult result = PreAdjustmentProcessResult result =
await gciExternalInterface await gciExternalInterface
.Preadjustment_CompletionAsync( .PreAdjustment_CompletionAsync(
slot, slot,
pp, pp,
token) token)
@@ -1738,7 +1738,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge
string.Format("{0}: {1} failed.", Name, operation), string.Format("{0}: {1} failed.", Name, operation),
ex); ex);
return new PreadjustmentProcessResult return new PreAdjustmentProcessResult
{ {
Success = false, Success = false,
Slot = slot, Slot = slot,
@@ -423,7 +423,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI
Logger.Trace("FORM: ---------------------------------"); Logger.Trace("FORM: ---------------------------------");
Logger.Trace("FORM: Preadjustment open."); Logger.Trace("FORM: Preadjustment open.");
_laatzenApi.ShowPreadjustmentForm(DialogOwner); _laatzenApi.ShowPreAdjustmentForm(DialogOwner);
Logger.Trace("FORM: Preadjustment shown."); Logger.Trace("FORM: Preadjustment shown.");
} }
@@ -166,7 +166,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.StaraTuraAPI_GciBridge
ExecuteAsync(async token => ExecuteAsync(async token =>
{ {
await ExecutePreadjustmentForSelectedSlotsAsync( await ExecutePreadjustmentForSelectedSlotsAsync(
_bridge.Preadjustment_PreparationAsync, _bridge.PreAdjustment_PreparationAsync,
"Preparation", "Preparation",
token); token);
}); });
@@ -179,7 +179,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.StaraTuraAPI_GciBridge
ExecuteAsync(async token => ExecuteAsync(async token =>
{ {
await ExecutePreadjustmentForSelectedSlotsAsync( await ExecutePreadjustmentForSelectedSlotsAsync(
_bridge.Preadjustment_AmplitudeTestAsync, _bridge.PreAdjustment_AmplitudeTestAsync,
"Amplitude Test", "Amplitude Test",
token); token);
}); });
@@ -192,7 +192,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.StaraTuraAPI_GciBridge
ExecuteAsync(async token => ExecuteAsync(async token =>
{ {
await ExecutePreadjustmentForSelectedSlotsAsync( await ExecutePreadjustmentForSelectedSlotsAsync(
_bridge.Preadjustment_TemperatureCalibrationAsync, _bridge.PreAdjustment_TemperatureCalibrationAsync,
"Temperature Calibration", "Temperature Calibration",
token); token);
}); });
@@ -205,7 +205,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.StaraTuraAPI_GciBridge
ExecuteAsync(async token => ExecuteAsync(async token =>
{ {
await ExecutePreadjustmentForSelectedSlotsAsync( await ExecutePreadjustmentForSelectedSlotsAsync(
_bridge.Preadjustment_OffsetTestAsync, _bridge.PreAdjustment_OffsetTestAsync,
"Offset Test", "Offset Test",
token); token);
}); });
@@ -218,7 +218,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.StaraTuraAPI_GciBridge
ExecuteAsync(async token => ExecuteAsync(async token =>
{ {
await ExecutePreadjustmentForSelectedSlotsAsync( await ExecutePreadjustmentForSelectedSlotsAsync(
_bridge.Preadjustment_CompletionAsync, _bridge.PreAdjustment_CompletionAsync,
"Completion", "Completion",
token); token);
}); });
@@ -246,7 +246,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.StaraTuraAPI_GciBridge
CreateMeterControls(selectedSlots); CreateMeterControls(selectedSlots);
PreadjustmentDetectResult result = PreadjustmentDetectResult result =
await _bridge.Preadjustment_DetectAsync(token); await _bridge.PreAdjustment_DetectAsync(token);
Log( Log(
result.Success result.Success
@@ -367,7 +367,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.StaraTuraAPI_GciBridge
} }
private async Task ExecutePreadjustmentForSelectedSlotsAsync( private async Task ExecutePreadjustmentForSelectedSlotsAsync(
Func<int, ProcessProgress, CancellationToken, Task<PreadjustmentProcessResult>> action, Func<int, ProcessProgress, CancellationToken, Task<PreAdjustmentProcessResult>> action,
string processName, string processName,
CancellationToken token) CancellationToken token)
{ {
@@ -385,7 +385,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.StaraTuraAPI_GciBridge
foreach (var selectedSlot in selectedSlots) foreach (var selectedSlot in selectedSlots)
{ {
PreadjustmentProcessResult result = PreAdjustmentProcessResult result =
await action( await action(
selectedSlot.Slot, selectedSlot.Slot,
pp, pp,