CRC should be ints or hex..not either or.. to int it is

This commit is contained in:
Jake Visser 2017-07-20 18:35:48 -07:00
commit eba14c8b1d

View file

@ -204,8 +204,9 @@ namespace qcbadge.Controllers
byte crc8res = (byte)(recbytes[0] ^ recbytes[1]);
System.Diagnostics.Debug.WriteLine("CRC the byte: " + crc8res);
String crcFinal = advertData.Substring(26, 2);
int crcFinalInt = Convert.ToInt32(crcFinal, 16);
if(crcFinal.Equals(crc8res))
if (crcFinalInt == crc8res)
{
String qcData = advertData.Substring(6, 22);
System.Diagnostics.Debug.WriteLine(qcData);