From 2cd34ba8fbc1efec0dff6e8917424a99103c7e50 Mon Sep 17 00:00:00 2001 From: Chris Tacke Date: Fri, 29 Sep 2023 10:01:26 -0500 Subject: [PATCH] improve firmware write messaging --- .../Commands/Current/Firmware/FirmwareWriteCommand.cs | 4 ++++ Source/v2/Meadow.Hcom/Connections/SerialConnection.cs | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/v2/Meadow.Cli/Commands/Current/Firmware/FirmwareWriteCommand.cs b/Source/v2/Meadow.Cli/Commands/Current/Firmware/FirmwareWriteCommand.cs index 75273f48..ecd65366 100644 --- a/Source/v2/Meadow.Cli/Commands/Current/Firmware/FirmwareWriteCommand.cs +++ b/Source/v2/Meadow.Cli/Commands/Current/Firmware/FirmwareWriteCommand.cs @@ -139,6 +139,10 @@ protected override async ValueTask ExecuteCommand(IMeadowConnection connection, Logger.LogInformation(e.message); } }; + connection.ConnectionMessage += (s, message) => + { + Logger.LogInformation(message); + }; var package = await GetSelectedPackage(); diff --git a/Source/v2/Meadow.Hcom/Connections/SerialConnection.cs b/Source/v2/Meadow.Hcom/Connections/SerialConnection.cs index 15854eda..db99e3c1 100644 --- a/Source/v2/Meadow.Hcom/Connections/SerialConnection.cs +++ b/Source/v2/Meadow.Hcom/Connections/SerialConnection.cs @@ -886,11 +886,10 @@ public override async Task WriteCoprocessorFile( _port.ReadTimeout = 60000; CommandTimeoutSeconds = 180; InfoMessages.Clear(); - var infoCount = 0; try { - RaiseConnectionMessage("\nTransferring file to coprocessor..."); + RaiseConnectionMessage($"Transferring {Path.GetFileName(localFileName)} to coprocessor..."); // push the file to the device await WriteFile(localFileName, null,