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

Improve init state detection #48

Merged
merged 4 commits into from
Sep 28, 2017
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
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.25.{build}
version: 0.26.{build}

pull_requests:
do_not_increment_build_number: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<PackageId>nanoFramework.Tools.Debugger.Net</PackageId>
<PackageVersion>0.4.0-preview025</PackageVersion>
<PackageVersion>0.4.0-preview026</PackageVersion>
<Description>This .NET library provides a debug client for nanoFramework devices using USB or Serial connection to a board.</Description>
<Authors>nanoFramework project contributors</Authors>
<Title>nanoFramework debug library for .NET</Title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ public static class DebuggerExtensions
/// </summary>
/// <param name="debugEngine"></param>
/// <returns></returns>
public static async ValueTask<bool> IsDeviceInInitializeStateAsync(this Engine debugEngine)
public static async Task<bool> IsDeviceInInitializeStateAsync(this Engine debugEngine)
{
var result = await debugEngine.SetExecutionModeAsync(0, 0);

if (result.success)
{
return ((result.currentExecutionMode & WireProtocol.Commands.Debugging_Execution_ChangeConditions.c_State_Mask) == WireProtocol.Commands.Debugging_Execution_ChangeConditions.c_State_Initialize);
var currentState = (result.currentExecutionMode & WireProtocol.Commands.Debugging_Execution_ChangeConditions.c_State_Mask);
return (currentState != WireProtocol.Commands.Debugging_Execution_ChangeConditions.c_State_ProgramRunning);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PackageId>nanoFramework.Tools.Debugger.UWP</PackageId>
<PackageVersion>0.4.0-preview025</PackageVersion>
<PackageVersion>0.4.0-preview026</PackageVersion>
<Description>This UWP library provides a debug client for nanoFramework devices using USB or Serial connection to a board.</Description>
<Authors>nanoFramework project contributors</Authors>
<Title>nanoFramework debug library for UWP</Title>
Expand Down