openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
755 B

#pragma once
#define msg_is_extaddr(msg) check_bmask(msg->TxFlags, ISO15765_ADDR_TYPE)
#define msg_is_padded(msg) check_bmask(msg->TxFlags, ISO15765_FRAME_PAD)
#define FRAME_SINGLE 0x00
#define FRAME_FIRST 0x10
#define FRAME_CONSEC 0x20
#define FRAME_FLOWCTRL 0x30
#define FLOWCTRL_CONTINUE 0
#define FLOWCTRL_WAIT 1
#define FLOWCTRL_ABORT 2
#define msg_get_type(msg, addrlen) ((msg).Data[addrlen] & 0xF0)
#define is_single(msg, addrlen) (msg_get_type(msg, addrlen) == FRAME_SINGLE)
#define is_first(msg, addrlen) (msg_get_type(msg, addrlen) == FRAME_FIRST)
#define is_consecutive(msg, addrlen) (msg_get_type(msg, addrlen) == FRAME_CONSEC)
#define is_flowctrl(msg, addrlen) (msg_get_type(msg, addrlen) == FRAME_FLOWCTRL)