-
Notifications
You must be signed in to change notification settings - Fork 0
/
vehicle_power_controller.patch
92 lines (82 loc) · 3.39 KB
/
vehicle_power_controller.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
diff --git a/src/vpc_gw/power_state_manager/power_state_manager.c b/src/vpc_gw/power_state_manager/power_state_manager.c
index a28e38c7..f2a5e27f 100644
--- a/src/vpc_gw/power_state_manager/power_state_manager.c
+++ b/src/vpc_gw/power_state_manager/power_state_manager.c
@@ -295,6 +295,8 @@ void power_state_manager_step(void) {
break;
default: {
+ //TODO: chose correct default for is_state_change, you can also default initialize it on line 226
+ is_state_change = true;
state_machine.current_state = I_POWER_MODE_INITIAL;
power_mode = I_POWER_MODE_INITIAL;
} break;
diff --git a/src/vpc_gw/vpc_gw.c b/src/vpc_gw/vpc_gw.c
index 966994c7..53d57a3e 100644
--- a/src/vpc_gw/vpc_gw.c
+++ b/src/vpc_gw/vpc_gw.c
@@ -29,7 +29,7 @@
#endif
#else
/* Define calibratable for NVM, necessary for SIL */
-PAL_NVM_CAL uint8_t palv_nvm_default_data[1];
+extern PAL_NVM_CAL uint8_t palv_nvm_default_data[1];
#endif
/* Defines and Type definitions */
@@ -71,7 +71,7 @@ void vpc_gw_initialise_app(void) {
void psc_background_app(void) {}
#endif
-static void initialize_standalone_can_channels() {
+static void initialize_standalone_can_channels(void) {
// Always initialize CAN Channel A for Pi-Innovo projects to keep CCP enabled!
palcan_init_channels(can_channels,
sizeof(can_channels) / sizeof(palcan_channel_t));
diff --git a/src/vpc_scu/pal_main.c b/src/vpc_scu/pal_main.c
index 119edbd9..959bef0c 100644
--- a/src/vpc_scu/pal_main.c
+++ b/src/vpc_scu/pal_main.c
@@ -22,7 +22,7 @@
#endif
#else
/* Define calibratable for NVM, necessary for SIL */
-PAL_NVM_CAL uint8_t palv_nvm_default_data[1];
+extern PAL_NVM_CAL uint8_t palv_nvm_default_data[1];
#endif
#ifndef ENABLE_SECONDARY_PROC
diff --git a/src/vpc_vcu/power_state_controller/power_state_controller.c b/src/vpc_vcu/power_state_controller/power_state_controller.c
index 9c0ac8b6..2cc5da1b 100644
--- a/src/vpc_vcu/power_state_controller/power_state_controller.c
+++ b/src/vpc_vcu/power_state_controller/power_state_controller.c
@@ -39,7 +39,7 @@ uint8_t vpc_vcu_dtcnvm_saving_status;
uint8_t vpc_vcu_vpc_vcu_power_mode;
/* Public function definitions */
-void power_state_controller_init() {
+void power_state_controller_init(void) {
read_pal_interface_inputs();
power_controller_init(&power_controller_output);
@@ -47,7 +47,7 @@ void power_state_controller_init() {
vpc_vcu_dtcnvm_saving_status = power_controller_output.dtcnvm_saving_status;
}
-void power_state_controller_update() {
+void power_state_controller_update(void) {
read_pal_interface_inputs();
power_controller_update(power_controller_input, &power_controller_output);
diff --git a/src/vpc_vcu/vpc_vcu.c b/src/vpc_vcu/vpc_vcu.c
index 26d8f795..be11af6c 100644
--- a/src/vpc_vcu/vpc_vcu.c
+++ b/src/vpc_vcu/vpc_vcu.c
@@ -30,7 +30,7 @@
#endif
#else
/* Define calibratable for NVM, necessary for SIL */
-PAL_NVM_CAL uint8_t palv_nvm_default_data[1];
+extern PAL_NVM_CAL uint8_t palv_nvm_default_data[1];
#endif
/* Defines and Type definitions */
@@ -74,7 +74,7 @@ void vpc_vcu_initialise_app(void) {
void psc_background_app(void) {}
#endif
-static void initialize_standalone_can_channels() {
+static void initialize_standalone_can_channels(void) {
// Always initialize CAN Channel A for Pi-Innovo projects to keep CCP enabled!
palcan_init_channels(can_channels,
sizeof(can_channels) / sizeof(palcan_channel_t));