Skip to content

Commit

Permalink
Fix merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrawehr committed Dec 16, 2023
1 parent 6c54ae1 commit 8d54946
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/devices/Arduino/FirmataDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1167,8 +1167,8 @@ internal void EnableAnalogReporting(int pinNumber, int analogChannel)
if (analogChannel <= 15)
{
_firmataStream.WriteByte((byte)((int)FirmataCommand.REPORT_ANALOG_PIN + analogChannel));
_firmataStream.WriteByte((byte)1);
}
_firmataStream.WriteByte((byte)1);
}
else if (_actualFirmataProtocolVersion >= new Version(2, 7))
{
// Note: Requires Protocol Version 2.7 or later
Expand All @@ -1178,7 +1178,7 @@ internal void EnableAnalogReporting(int pinNumber, int analogChannel)
commandSequence.WriteByte((byte)1);
commandSequence.WriteByte((byte)FirmataCommand.END_SYSEX);
SendCommand(commandSequence);
}
}
else
{
throw new NotSupportedException($"Using analog channel A{analogChannel} requires firmata protocol version 2.7 or later");
Expand All @@ -1199,8 +1199,8 @@ internal void DisableAnalogReporting(int pinNumber, int analogChannel)
if (analogChannel <= 15)
{
_firmataStream.WriteByte((byte)((int)FirmataCommand.REPORT_ANALOG_PIN + analogChannel));
_firmataStream.WriteByte((byte)0);
}
_firmataStream.WriteByte((byte)0);
}
else
{
FirmataCommandSequence pwmCommandSequence = new();
Expand Down
14 changes: 7 additions & 7 deletions tools/ArduinoCsCompiler/tests/FirmataIlExecutorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public void LargeStructTest(string methodName, Int32 argument1, Int32 argument2,
[InlineData(nameof(TestMethods.CastClassTest), 0, 0, 1)]
public void CastTest(string methodName, Int32 argument1, Int32 argument2, Int32 expected)
{
LoadCodeMethod(methodName, argument1, argument2, expected, new CompilerSettings() { CreateKernelForFlashing = false, UseFlashForKernel = false });
LoadCodeMethod(typeof(TestMethods), methodName, argument1, argument2, expected, new CompilerSettings() { CreateKernelForFlashing = false, UseFlashForKernel = false });
}

[Theory]
Expand Down Expand Up @@ -347,7 +347,7 @@ public void EnumsHaveNames()
UseFlashForProgram = false
};

LoadCodeMethod(nameof(TestMethods.EnumsHaveNames), 0, 0, 1, compilerSettings, false);
LoadCodeMethod(typeof(TestMethods), nameof(TestMethods.EnumsHaveNames), 0, 0, 1, compilerSettings, false);
}

[Theory]
Expand All @@ -363,7 +363,7 @@ public void DoubleToStringTest(string name)
UseFlashForProgram = true
};

LoadCodeMethod(name, 20.23, 202.1, 20.23, compilerSettings);
LoadCodeMethod(typeof(TestMethods), name, 20.23, 202.1, 20.23, compilerSettings);
}

/// <summary>
Expand Down Expand Up @@ -415,7 +415,7 @@ public void IteratorProblems(string methodName, int arg1)
UseFlashForProgram = true
};

LoadCodeMethod(methodName, arg1, 0, 1, compilerSettings);
LoadCodeMethod(typeof(TestMethods), methodName, arg1, 0, 1, compilerSettings);
}

/// <summary>
Expand All @@ -435,7 +435,7 @@ public void CanMergeSimilarGenericMethods(string methodName, int arg1)
UseFlashForProgram = true
};

LoadCodeMethod(methodName, arg1, 0, 1, compilerSettings);
LoadCodeMethod(typeof(TestMethods), methodName, arg1, 0, 1, compilerSettings);
}

[Theory]
Expand All @@ -461,7 +461,7 @@ public void ExceptionHandling(string methodName, int arg1)
UseFlashForProgram = true
};

LoadCodeMethod(methodName, arg1, 0, 1, compilerSettings);
LoadCodeMethod(typeof(TestMethods), methodName, arg1, 0, 1, compilerSettings);
}

[Theory]
Expand All @@ -477,7 +477,7 @@ public void ExceptionHandlingForBuiltinErrors(string methodName, int arg1)
UseFlashForProgram = false
};

LoadCodeMethod(methodName, arg1, 0, 1, compilerSettings);
LoadCodeMethod(typeof(TestMethods), methodName, arg1, 0, 1, compilerSettings);
}

[Theory]
Expand Down

0 comments on commit 8d54946

Please sign in to comment.