Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output cleanup #579

Merged
merged 5 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private void OnFileWriteProgress(object? sender, (string fileName, long complete
if (!double.IsNaN(p))
{
// Console instead of Logger due to line breaking for progress bar
Console?.Output.Write($"Writing {e.fileName}: {p:0}% \r");
Console?.Output.Write($"Writing '{e.fileName}': {p:0}% \r");
}
}
}
2 changes: 1 addition & 1 deletion Source/v2/Meadow.Cli/Commands/Current/App/AppRunCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private void OnFileWriteProgress(object? sender, (string fileName, long complete

if (!double.IsNaN(p))
{ // Console instead of Logger due to line breaking for progress bar
Console?.Output.Write($"Writing {e.fileName}: {p:0}% \r");
Console?.Output.Write($"Writing '{e.fileName}': {p:0}% \r");
}
}

Expand Down
11 changes: 9 additions & 2 deletions Source/v2/Meadow.Cli/Commands/Current/File/FileDeleteCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ protected override async ValueTask ExecuteCommand()
await device.RuntimeDisable(CancellationToken);
}

Logger?.LogInformation($"Looking for file {MeadowFile}...");
if (MeadowFile == "all")
{
Logger?.LogInformation($"Looking for files...");
}
else
{
Logger?.LogInformation($"Looking for file {MeadowFile}...");
}

var folder = AppTools.SanitizeMeadowFolderName(Path.GetDirectoryName(MeadowFile)!);

Expand Down Expand Up @@ -60,7 +67,7 @@ protected override async ValueTask ExecuteCommand()
}
else
{
Logger?.LogInformation($"Deleting file '{file}' from device...");
Logger?.LogInformation($"Deleting '{file}'");
await device.DeleteFile(file, CancellationToken);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected override async ValueTask ExecuteCommand()
if (!double.IsNaN(p))
{
// Console instead of Logger due to line breaking for progress bar
Console?.Output.Write($"Writing {e.fileName}: {p:0}% \r");
Console?.Output.Write($"Writing '{e.fileName}': {p:0}% \r");
}
};

Expand Down
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.48.0</PackageVersion>
<PackageVersion>2.0.49.0</PackageVersion>
<Platforms>AnyCPU</Platforms>
<PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.CLI/</PackageProjectUrl>
<RepositoryUrl>https://github.com/WildernessLabs/Meadow.CLI</RepositoryUrl>
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,5 +6,5 @@ namespace Meadow.CLI;

public static class Constants
{
public const string CLI_VERSION = "2.0.48.0";
public const string CLI_VERSION = "2.0.49.0";
}
2 changes: 1 addition & 1 deletion Source/v2/Meadow.Dfu/DfuUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static async Task<bool> FlashFile(string fileName, string? dfuSerialNumbe
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
logger.LogError("dfu-util not found - to install, run: `meadow install dfu-util` (may require administrator mode)");
logger.LogError("dfu-util not found - to install, run: `meadow dfu install` (may require administrator mode)");
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
Expand Down
2 changes: 0 additions & 2 deletions Source/v2/Meadow.Hcom/Connections/SerialConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1036,8 +1036,6 @@ void OnFileRetry(object? sender, EventArgs e)
FileException += OnFileError;
FileWriteFailed += OnFileRetry;

Debug.WriteLine($"Sending '{localFileName}'");

EnqueueRequest(command);

// this will wait for a "file write accepted" from the target
Expand Down
2 changes: 1 addition & 1 deletion Source/v2/Meadow.Tooling.Core/App/AppManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public static async Task DeployApplication(
}
}

logger?.LogInformation($"Sending '{Path.GetFileName(localFile.Key)}'");
logger?.LogInformation($"Sending '{Path.GetFileName(localFile.Key)}'".PadRight(80));
send_file:

if (!await connection.WriteFile(localFile.Key, meadowFilename, cancellationToken))
Expand Down
Loading