Commit 19fb385 1 parent b9afa13 commit 19fb385 Copy full SHA for 19fb385
File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 3
3
#include "safety_declarations.h"
4
4
5
5
static bool rivian_longitudinal = false;
6
+ // If VDM_AdasSts is being sent to the ACM with the intention of canceling
7
+ static bool rivian_openpilot_canceling = false;
6
8
7
9
static void rivian_rx_hook (const CANPacket_t * to_push ) {
8
10
int bus = GET_BUS (to_push );
@@ -100,6 +102,17 @@ static bool rivian_tx_hook(const CANPacket_t *to_send) {
100
102
}
101
103
}
102
104
105
+ if (bus == 2 ) {
106
+ if (addr == 0x162 ) {
107
+ // VDM_AdasInterfaceStatus
108
+ const int adas_interface_status = ((GET_BYTE (to_push , 6 ) >> 3U ) & 0x3U ;
109
+ if (adas_interface_status != 0 ) {
110
+ tx = false;
111
+ }
112
+ rivian_openpilot_canceling = GET_BIT (to_push , 0 );
113
+ }
114
+ }
115
+
103
116
return tx ;
104
117
}
105
118
You can’t perform that action at this time.
0 commit comments