aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-11-28 10:46:06 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-11-28 10:46:06 +0200
commit4276c14c8462bd3ec4c946608fe8a8e985941b57 (patch)
treeba191e0fda45a5a58942d1f962e6864c532d3e3b /Software/Visual_Studio/PPC/Tango.PPC.Common/Connection
parent3f22291740c0ac631a655495f6198dbf18be2de2 (diff)
downloadTango-4276c14c8462bd3ec4c946608fe8a8e985941b57.tar.gz
Tango-4276c14c8462bd3ec4c946608fe8a8e985941b57.zip
Working on backup/restore.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Connection')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs12
1 files changed, 10 insertions, 2 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 109b8062e..31b5d93fc 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
@@ -74,6 +74,8 @@ namespace Tango.PPC.Common.Connection
/// </summary>
public DefaultMachineProvider()
{
+ var settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
+
MachineOperator = new MachineOperator();
MachineOperator.EnableEventsNotification = true;
MachineOperator.EnableJobResume = true;
@@ -81,9 +83,8 @@ namespace Tango.PPC.Common.Connection
MachineOperator.EnableMachineStatusUpdates = true;
MachineOperator.EnableDiagnostics = false;
MachineOperator.EnableEmbeddedDebugging = false;
- MachineOperator.FirmwareUpgradeMode = Integration.Upgrade.FirmwareUpgradeModes.DFU | Integration.Upgrade.FirmwareUpgradeModes.TFP_PACKAGE;
- var settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
+ MachineOperator.FirmwareUpgradeMode = Integration.Upgrade.FirmwareUpgradeModes.DFU | Integration.Upgrade.FirmwareUpgradeModes.TFP_PACKAGE;
MachineOperator.JobUploadStrategy = settings.JobUploadStrategy;
MachineOperator.JobUnitsMethod = settings.JobUnitsMethod;
@@ -218,6 +219,13 @@ namespace Tango.PPC.Common.Connection
if (Machine != null)
{
LogManager.Log("First machine entry found. Machine serial number is: " + Machine.SerialNumber + ".");
+
+ if (Machine.IsDemo)
+ {
+ LogManager.Log("Machine is in demo mode. Changing firmware upgrade mode to TFP package only.");
+ MachineOperator.FirmwareUpgradeMode = Integration.Upgrade.FirmwareUpgradeModes.TFP_PACKAGE;
+ }
+
ConnectToMachine();
}
else