Skip to content

Commit

Permalink
Merge pull request #467 from WildernessLabs/improve_firmware_write
Browse files Browse the repository at this point in the history
Improve firmware write behavior
  • Loading branch information
ctacke authored Feb 13, 2024
2 parents 010eaf2 + 3c38835 commit 8448c56
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 209 deletions.
2 changes: 1 addition & 1 deletion Source/v2/Meadow.CLI/Meadow.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Authors>Wilderness Labs, Inc</Authors>
<Company>Wilderness Labs, Inc</Company>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageVersion>2.0.3</PackageVersion>
<PackageVersion>2.0.4</PackageVersion>
<Platforms>AnyCPU</Platforms>
<PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.CLI/</PackageProjectUrl>
<RepositoryUrl>https://github.com/WildernessLabs/Meadow.CLI</RepositoryUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ protected override async ValueTask ExecuteCommand()

if (package == null)
{
Logger?.LogError($"Firmware write failed - No package selected");
return;
}

Expand Down Expand Up @@ -241,6 +240,8 @@ protected override async ValueTask ExecuteCommand()
|| Path.GetFileName(IndividualFile) == F7FirmwarePackageCollection.F7FirmwareFiles.CoprocApplicationFile
|| Path.GetFileName(IndividualFile) == F7FirmwarePackageCollection.F7FirmwareFiles.CoprocBootloaderFile)
{
await connection.RuntimeDisable();

await WriteEspFiles(connection, deviceInfo, package);
}

Expand Down Expand Up @@ -291,11 +292,9 @@ protected override async ValueTask ExecuteCommand()

private async Task WriteEspFiles(IMeadowConnection? connection, DeviceInfo? deviceInfo, FirmwarePackage package)
{
if (connection == null)
{
connection = await GetConnectionAndDisableRuntime();
if (connection == null) return; // couldn't find a connected device
}
connection ??= await GetConnectionAndDisableRuntime();

if (connection == null) { return; } // couldn't find a connected device

Logger?.LogInformation($"{Environment.NewLine}Writing Coprocessor files...");

Expand Down Expand Up @@ -372,7 +371,7 @@ private async Task WriteEspFiles(IMeadowConnection? connection, DeviceInfo? devi

if (existing == null)
{
Logger?.LogError($"Requested version '{Version}' not found");
Logger?.LogError($"Requested firmware version '{Version}' not found");
return null;
}
package = existing;
Expand Down
2 changes: 1 addition & 1 deletion Source/v2/Meadow.Cli/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ namespace Meadow.CLI
{
public static class Constants
{
public const string CLI_VERSION = "2.0.3.0";
public const string CLI_VERSION = "2.0.4.0";
}
}
200 changes: 0 additions & 200 deletions Source/v2/Meadow.Hcom/Firmware/DownloadManager.cs

This file was deleted.

0 comments on commit 8448c56

Please sign in to comment.