Skip to content

Commit

Permalink
Only flash the MeadowComms.bin file if path provided.
Browse files Browse the repository at this point in the history
  • Loading branch information
CartBlanche committed Nov 16, 2023
1 parent ccf3e22 commit bd7a2e1
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,21 +375,27 @@ private async ValueTask WriteFiles(FirmwarePackage? package, IMeadowConnection c

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

string[]? fileList;
string[]? fileList = Array.Empty<string>();
if (coProcessorFilePath != null
&& package.CoprocBootloader != null
&& package.CoprocPartitionTable != null)
{
fileList = new string[]
if (!string.IsNullOrEmpty(Path))
{
fileList = new string[]
{
package.GetFullyQualifiedPath(coProcessorFilePath),
package.GetFullyQualifiedPath(package.CoprocBootloader),
package.GetFullyQualifiedPath(package.CoprocPartitionTable),
package.GetFullyQualifiedPath(coProcessorFilePath),
};
}
else
{
fileList = Array.Empty<string>();
}
else
{
fileList = new string[]
{
package.GetFullyQualifiedPath(coProcessorFilePath),
package.GetFullyQualifiedPath(package.CoprocBootloader),
package.GetFullyQualifiedPath(package.CoprocPartitionTable),
};
}
}

await connection.Device.WriteCoprocessorFiles(fileList, CancellationToken);
Expand Down

0 comments on commit bd7a2e1

Please sign in to comment.