Skip to content

Commit a9933db

Browse files
Bump Microsoft.Net.Compilers.Toolset from 3.8.0 to 3.9.0 in /tools/DevicesApiTester (dotnet#1464)
* Bump Microsoft.Net.Compilers.Toolset in /tools/DevicesApiTester Bumps [Microsoft.Net.Compilers.Toolset](https://github.com/dotnet/roslyn) from 3.8.0 to 3.9.0. - [Release notes](https://github.com/dotnet/roslyn/releases) - [Changelog](https://github.com/dotnet/roslyn/blob/master/docs/Breaking%20API%20Changes.md) - [Commits](dotnet/roslyn@v3.8.0...v3.9.0) Signed-off-by: dependabot[bot] <[email protected]> * Fix buildbreak due to missing casts Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jose Perez Rodriguez <[email protected]>
1 parent 2dca46c commit a9933db

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

eng/Compilers.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- This is set to false by default when using the compilers' NuGet package. -->
44
<UseSharedCompilation>true</UseSharedCompilation>
55

6-
<CompilerVersion>3.8.0</CompilerVersion>
6+
<CompilerVersion>3.9.0</CompilerVersion>
77
</PropertyGroup>
88

99
<PropertyGroup>

src/devices/Arduino/FirmataDevice.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ internal void WriteDigitalPin(int pin, PinValue value)
860860

861861
FirmataCommandSequence writeDigitalPin = new FirmataCommandSequence(FirmataCommand.SET_DIGITAL_VALUE);
862862
writeDigitalPin.WriteByte((byte)pin);
863-
writeDigitalPin.WriteByte(value == PinValue.High ? 1 : 0);
863+
writeDigitalPin.WriteByte(value == PinValue.High ? (byte)1 : (byte)0);
864864

865865
SendCommand(writeDigitalPin);
866866
}

src/devices/Card/Mifare/MifareCard.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ public bool IsSectorBlock(byte blockNumber)
571571
/// </summary>
572572
/// <param name="sectorNumber">Input sector number</param>
573573
/// <returns>The number of blocks for this specific sector</returns>
574-
public byte GetNumberBlocks(byte sectorNumber) => sectorNumber < 32 ? 4 : 16;
574+
public byte GetNumberBlocks(byte sectorNumber) => sectorNumber < 32 ? (byte)4 : (byte)16;
575575

576576
/// <summary>
577577
/// Get the number of blocks for a specific sector
@@ -807,7 +807,7 @@ public bool FormatNdef(ReadOnlySpan<byte> keyB = default)
807807
authOk &= WriteDataBlock(2);
808808
authOk &= AuthenticateBlockKeyB(keyFormat, 3);
809809
Data = new byte[] { 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0x78, 0x77, 088, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
810-
Data[9] = Capacity == MifareCardCapacity.Mifare1K ? 0xC1 : 0xC2;
810+
Data[9] = Capacity == MifareCardCapacity.Mifare1K ? (byte)0xC1 : (byte)0xC2;
811811
keyFormat.CopyTo(Data, 10);
812812
authOk &= WriteDataBlock(3);
813813
authOk &= AuthenticateBlockKeyB(keyFormat, 4);

src/devices/Tsl256x/Tsl256x.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public bool Enabled
6161
{
6262
// 0x03 is power on, see doc page 14
6363
get => (ReadByte(Register.CONTROL) & 0x03) == 0x03;
64-
set => WriteByte(Register.CONTROL, value ? 0x03 : 0x00);
64+
set => WriteByte(Register.CONTROL, value ? (byte)0x03 : (byte)0x00);
6565
}
6666

6767
/// <summary>
@@ -194,7 +194,7 @@ public ushort GetRawLuminosity(Channel channel)
194194
case Channel.Infrared:
195195
return channel1;
196196
case Channel.Visible:
197-
return (channel0 > channel1) ? (ushort)(channel0 - channel1) : 0;
197+
return (channel0 > channel1) ? (ushort)(channel0 - channel1) : (ushort)0;
198198
default:
199199
throw new ArgumentException($"Wrong channel");
200200
}

0 commit comments

Comments
 (0)