Skip to content

Commit 6e15bab

Browse files
authored
Fix failed reporting of launching nanoBooter (#271)
1 parent cf43d26 commit 6e15bab

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

nanoFirmwareFlasher.Library/NanoDeviceOperations.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ public async Task<ExitCodes> UpdateDeviceClrAsync(
288288
}
289289
}
290290

291-
bool attemptToLaunchBooter = false;
291+
bool booterLaunched = false;
292292

293293
if (nanoDevice.DebugEngine.IsConnectedTonanoCLR)
294294
{
@@ -306,9 +306,9 @@ public async Task<ExitCodes> UpdateDeviceClrAsync(
306306
Console.ForegroundColor = ConsoleColor.White;
307307
}
308308

309-
attemptToLaunchBooter = nanoDevice.ConnectToNanoBooter();
309+
booterLaunched = nanoDevice.ConnectToNanoBooter();
310310

311-
if (!attemptToLaunchBooter)
311+
if (!booterLaunched)
312312
{
313313
// check for version where the software reboot to nanoBooter was made available
314314
if (currentClrVersion != null &&
@@ -334,10 +334,10 @@ public async Task<ExitCodes> UpdateDeviceClrAsync(
334334
}
335335
else
336336
{
337-
attemptToLaunchBooter = true;
337+
booterLaunched = true;
338338
}
339339

340-
if (attemptToLaunchBooter &&
340+
if (booterLaunched &&
341341
nanoDevice.Ping() == Debugger.WireProtocol.ConnectionSource.nanoBooter)
342342
{
343343
// get address for CLR block expected by device
@@ -380,7 +380,7 @@ public async Task<ExitCodes> UpdateDeviceClrAsync(
380380
}
381381
}
382382

383-
if (attemptToLaunchBooter)
383+
if (booterLaunched)
384384
{
385385
// try to reboot target
386386
if (verbosity >= VerbosityLevel.Normal)
@@ -408,7 +408,7 @@ public async Task<ExitCodes> UpdateDeviceClrAsync(
408408
}
409409
else
410410
{
411-
if (attemptToLaunchBooter)
411+
if (!booterLaunched)
412412
{
413413
// only report this as an error if the launch was successful
414414
throw new NanoDeviceOperationFailedException("Failed to launch nanoBooter. Quitting update.");

0 commit comments

Comments
 (0)