1
1
void default_rx_hook (CAN_FIFOMailBox_TypeDef * to_push ) {}
2
2
3
+ int default_ign_hook () {
4
+ return -1 ; // use GPIO to determine ignition
5
+ }
6
+
3
7
// *** no output safety mode ***
4
8
5
9
static void nooutput_init (int16_t param ) {
@@ -14,9 +18,6 @@ static int nooutput_tx_lin_hook(int lin_num, uint8_t *data, int len) {
14
18
return false;
15
19
}
16
20
17
- static int nooutput_ign_hook () {
18
- return -1 ;
19
- }
20
21
static int nooutput_fwd_hook (int bus_num , CAN_FIFOMailBox_TypeDef * to_fwd ) {
21
22
return -1 ;
22
23
}
@@ -26,7 +27,7 @@ const safety_hooks nooutput_hooks = {
26
27
.rx = default_rx_hook ,
27
28
.tx = nooutput_tx_hook ,
28
29
.tx_lin = nooutput_tx_lin_hook ,
29
- .ignition = nooutput_ign_hook ,
30
+ .ignition = default_ign_hook ,
30
31
.fwd = nooutput_fwd_hook ,
31
32
};
32
33
@@ -44,10 +45,6 @@ static int alloutput_tx_lin_hook(int lin_num, uint8_t *data, int len) {
44
45
return true;
45
46
}
46
47
47
- static int alloutput_ign_hook () {
48
- return -1 ;
49
- }
50
-
51
48
static int alloutput_fwd_hook (int bus_num , CAN_FIFOMailBox_TypeDef * to_fwd ) {
52
49
return -1 ;
53
50
}
@@ -57,7 +54,7 @@ const safety_hooks alloutput_hooks = {
57
54
.rx = default_rx_hook ,
58
55
.tx = alloutput_tx_hook ,
59
56
.tx_lin = alloutput_tx_lin_hook ,
60
- .ignition = alloutput_ign_hook ,
57
+ .ignition = default_ign_hook ,
61
58
.fwd = alloutput_fwd_hook ,
62
59
};
63
60
0 commit comments