Update receive_check.ino

Checking CAN.checkReceive() agains MC_STAT_RXIF_MASK doesn't seem to make sense, it was confusing to me because the code seemed to be using equality with a mask. Since checkReceive() actually returns CAN_MSGAVAIL or CAN_NOMSG, Comparison with CAN_MSGAVAIL seemed more informative than MC_STAT_RXIF_MASK.
This commit is contained in:
woodward1
2014-02-28 15:41:11 -08:00
parent ebd2eaebc3
commit 7c20dc8ef1
+2 -2
View File
@@ -35,7 +35,7 @@ START_INIT:
void loop()
{
if(MCP_STAT_RXIF_MASK == CAN.checkReceive()) // check if data coming
if(CAN_MSGAVAIL == CAN.checkReceive()) // check if data coming
{
CAN.readMsgBuf(&len, buf); // read data, len: data length, buf: data buf
@@ -49,4 +49,4 @@ void loop()
/*********************************************************************************************************
END FILE
*********************************************************************************************************/
*********************************************************************************************************/