Skip to content

Commit 744c341

Browse files
authored
Fix DeployApplication (#215)
***NO_CI***
1 parent 8d9dfd5 commit 744c341

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

nanoFirmwareFlasher.Library/NanoDeviceOperations.cs

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -623,62 +623,6 @@ public ExitCodes DeployApplication(
623623
true,
624624
true))
625625
{
626-
if (verbosity >= VerbosityLevel.Normal)
627-
{
628-
Console.Write($"Erasing deployment block storage...");
629-
}
630-
631-
var retryCount = 0;
632-
633-
retryErase:
634-
635-
var eraseResult = nanoDevice.Erase(
636-
EraseOptions.Deployment,
637-
null,
638-
null);
639-
640-
if (!eraseResult)
641-
{
642-
if (retryCount < 3)
643-
{
644-
// Give it a bit of time
645-
Thread.Sleep(400);
646-
647-
retryCount++;
648-
649-
goto retryErase;
650-
}
651-
else
652-
{
653-
Console.WriteLine("");
654-
655-
Console.ForegroundColor = ConsoleColor.Red;
656-
Console.WriteLine($"Too many retries erasing nano device.");
657-
Console.WriteLine("");
658-
659-
Console.ForegroundColor = ConsoleColor.White;
660-
661-
return ExitCodes.E2002;
662-
}
663-
}
664-
else
665-
{
666-
if (verbosity >= VerbosityLevel.Normal)
667-
{
668-
Console.ForegroundColor = ConsoleColor.Green;
669-
Console.WriteLine("OK");
670-
671-
Console.ForegroundColor = ConsoleColor.White;
672-
}
673-
else
674-
{
675-
Console.WriteLine("");
676-
}
677-
}
678-
679-
// needed for slow devices
680-
Thread.Sleep(200);
681-
682626
if (verbosity >= VerbosityLevel.Normal)
683627
{
684628
Console.Write($"Deploying managed application...");

0 commit comments

Comments
 (0)