Use one fewer CAN mailbox
This commit is contained in:
		@ -19,8 +19,10 @@ void Init_Can_0() {
 | 
				
			|||||||
  Can0.setNumTXBoxes(1); // reserves mailbox 0 for tx only 8 mailboxes are
 | 
					  Can0.setNumTXBoxes(1); // reserves mailbox 0 for tx only 8 mailboxes are
 | 
				
			||||||
                         // available (the other 7 mailboxes are for rx)
 | 
					                         // available (the other 7 mailboxes are for rx)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Can0.watchFor(CAN_ID_BCU_APS_BRAKE);
 | 
					  // We only have 7 mailboxes, but want to receive 8 messages. This trick should
 | 
				
			||||||
  Can0.watchFor(CAN_ID_BCU_ETC);
 | 
					  // allow us to receive BCU_APS_BRAKE and BCU_ETC in the same mailbox.
 | 
				
			||||||
 | 
					  Can0.watchFor(CAN_ID_BCU_APS_BRAKE & CAN_ID_BCU_ETC,
 | 
				
			||||||
 | 
					                ~(CAN_ID_BCU_APS_BRAKE ^ CAN_ID_BCU_ETC));
 | 
				
			||||||
  Can0.watchFor(CAN_ID_BCU_SHIFT_CTRL);
 | 
					  Can0.watchFor(CAN_ID_BCU_SHIFT_CTRL);
 | 
				
			||||||
  Can0.watchFor(CAN_ID_BCU_LAP_TIME);
 | 
					  Can0.watchFor(CAN_ID_BCU_LAP_TIME);
 | 
				
			||||||
  Can0.watchFor(CAN_ID_MS4_IGN_REV_ATH);
 | 
					  Can0.watchFor(CAN_ID_MS4_IGN_REV_ATH);
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user