Skip to content

Commit

Permalink
Fix DeployApplication (#215)
Browse files Browse the repository at this point in the history
***NO_CI***
  • Loading branch information
josesimoes authored May 31, 2023
1 parent 8d9dfd5 commit 744c341
Showing 1 changed file with 0 additions and 56 deletions.
56 changes: 0 additions & 56 deletions nanoFirmwareFlasher.Library/NanoDeviceOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -623,62 +623,6 @@ public ExitCodes DeployApplication(
true,
true))
{
if (verbosity >= VerbosityLevel.Normal)
{
Console.Write($"Erasing deployment block storage...");
}

var retryCount = 0;

retryErase:

var eraseResult = nanoDevice.Erase(
EraseOptions.Deployment,
null,
null);

if (!eraseResult)
{
if (retryCount < 3)
{
// Give it a bit of time
Thread.Sleep(400);

retryCount++;

goto retryErase;
}
else
{
Console.WriteLine("");

Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine($"Too many retries erasing nano device.");
Console.WriteLine("");

Console.ForegroundColor = ConsoleColor.White;

return ExitCodes.E2002;
}
}
else
{
if (verbosity >= VerbosityLevel.Normal)
{
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("OK");

Console.ForegroundColor = ConsoleColor.White;
}
else
{
Console.WriteLine("");
}
}

// needed for slow devices
Thread.Sleep(200);

if (verbosity >= VerbosityLevel.Normal)
{
Console.Write($"Deploying managed application...");
Expand Down

0 comments on commit 744c341

Please sign in to comment.