aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-04-30 09:09:16 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-04-30 09:09:16 +0300
commitb3251faca81119a951c176291cec428646500b17 (patch)
treeaf32f341535d6ec99fc3a7e55cd2e116ac13992d /Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
parentd858956962045f35cf895008b57a507ba39903a9 (diff)
downloadTango-b3251faca81119a951c176291cec428646500b17.tar.gz
Tango-b3251faca81119a951c176291cec428646500b17.zip
General bug fixes.
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.cs7
1 files changed, 6 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 61ddfdb2b..ab42de712 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
@@ -79,6 +79,7 @@ namespace Tango.PPC.Common.Connection
MachineOperator.UseKeepAlive = true;
MachineOperator.EnableDiagnostics = false;
MachineOperator.EnableEmbeddedDebugging = false;
+ MachineOperator.FirmwareUpgradeMode = Integration.Upgrade.FirmwareUpgradeModes.DFU | Integration.Upgrade.FirmwareUpgradeModes.TFP_PACKAGE;
var settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
@@ -96,6 +97,8 @@ namespace Tango.PPC.Common.Connection
{
try
{
+ Thread.Sleep(2000);
+
LogManager.Log("Starting machine connection procedure...", LogCategory.Debug);
var settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
@@ -108,7 +111,7 @@ namespace Tango.PPC.Common.Connection
LogManager.Log("Scanning for machine on available serial ports...", LogCategory.Debug);
Transport.Discovery.UsbCommunicationScanner<ConnectRequest, ConnectResponse> scanner = new Transport.Discovery.UsbCommunicationScanner<ConnectRequest, ConnectResponse>(UsbSerialBaudRates.BR_115200);
- var response = await scanner.Scan(new ConnectRequest() { Password = "1234" }, timeout);
+ var response = await scanner.Scan(new ConnectRequest() { Password = "1234" }, settings.EmbeddedDeviceHint, timeout);
LogManager.Log("Machine discovered on port: " + response.Adapter.Address, LogCategory.Debug);
LogManager.Log("Device Information:", LogCategory.Debug);
@@ -132,6 +135,7 @@ namespace Tango.PPC.Common.Connection
await Task.Delay(1000);
await MachineOperator.UploadHardwareConfiguration(Machine.Configuration.HardwareVersion, Machine.Configuration);
+ MachineOperator.UseKeepAlive = true;
}
else
{
@@ -152,6 +156,7 @@ namespace Tango.PPC.Common.Connection
await Task.Delay(1000);
await MachineOperator.UploadHardwareConfiguration(Machine.Configuration.HardwareVersion, Machine.Configuration);
+ MachineOperator.UseKeepAlive = true;
}
}
else