{
{ 0x0217ffc, 20, 0, 0, xc90_2008my_ms_lsm0_handler },
{ 0x131726c, 25, 0, 0, xc90_2008my_ms_swm_handler },
{ 0x12173be, 45, 0, 0, xc90_2008my_ms_rem_handler },
{ 0x2510020, 80, 0, 0, xc90_2008my_ms_wheel_handler },
{ 0x2803008, 60, 0, 0, xc90_2008my_ms_lsm1_handler },
{ 0x3200428, 90, 0, 0, xc90_2008my_ms_gear_handler },
{ 0x2006428, 120, 0, 0, xc90_2008my_ms_acc_handler },
{ 0x4000002, 1000, 0, 0, xc90_2008my_ms_odo_handler }, //Confirmed working
{ 0x2803008, 180, 0, 0, xc90_2008my_ms_rpm_handler }, //Confirmed working
{ 0x217FFC, 150, 0, 0, xc90_2008my_ms_vel_handler }, //Confirmed working
{ 0x381526C, 240, 0, 0, xc90_2008my_ms_fuel_handler }, //Likely correct
{ 0x2202262, 270, 0, 0, xc90_2008my_ms_ds_belt_handler }, //Confirmed working
{ 0x3A04004, 300, 0, 0, xc90_2008my_ms_park_brake_handler }, //Confirmed working
...
Defines which callback function to call when a can message of the specified ID arrives (e.g. messages with ID 0x0217ffc
should be handled by xc90_2008my_ms_lsm0_handler
).
uint8_t angle = msg[6] & 0x3f;
The angle in this case is encoded by the lowest 6 bits of the 7th byte of the CAN message. So this essentially takes the 7th byte in the CAN message and applies a "bitwise AND" operator to it (essentially ignoring the 7 and 6th bits).
0x3f == 0011 1111 in bits
Original msg[6]: 1 0 1 0 1 0 1 0
Mask 0x3F: 0 0 1 1 1 1 1 1
Result (angle): 0 0 1 0 1 0 1 0 => 0b00101010 = 42
In your case you would take the 3rd byte msg[2], and apply a bit wise AND operator to extract whether or not the trunk is open or not:
Mask definition:
uint8_t mask_trunk = 1 << 6; // bit shift operator to produce bitmask 0b01000000 for bit 22
uint8_t mask_rear_door = 1 << 7; // bit shift operator to produce bitmask 0b10000000 for bit 23
Applying the bitmask:
bool trunk_open = msg[2] & (1 << 6);
bool rear_door_open = msg[2] & (1 << 7);
Hope that helps!