aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
index 7f67a4444..7a5a14ede 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
@@ -442,10 +442,18 @@ namespace Tango.PPC.Common.Connection
/// <summary>
/// Called when the machine has connected.
/// </summary>
- protected virtual void OnMachineConnected()
+ protected async virtual void OnMachineConnected()
{
IsConnected = true;
+
MachineConnected?.Invoke(this, new EventArgs());
+
+ try
+ {
+ var settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
+ await MachineOperator.SetPowerDownTime((int)settings.PowerSavingMode);
+ }
+ catch { }
}
/// <summary>