dragonpilot 0.7.10

This commit is contained in:
Rick Lan
2020-10-30 11:38:41 +10:00
parent 8369e11417
commit a8f732edb4
138 changed files with 14889 additions and 3028 deletions
+5
View File
@@ -3,6 +3,11 @@ CFLAGS = -g -Wall -Wextra -Wstrict-prototypes -Werror
CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4
CFLAGS += -mhard-float -DSTM32F4 -DSTM32F413xx -mfpu=fpv4-sp-d16 -fsingle-precision-constant
dp_vw := $(shell cat /data/params/d/dp_vw)
$(info dp_vw is ${dp_vw})
ifeq ($(dp_vw), 1)
CFLAGS += -Dvw
endif
STARTUP_FILE = startup_stm32f413xx
include build.mk
+14
View File
@@ -124,10 +124,24 @@ void set_safety_mode(uint16_t mode, int16_t param) {
switch (mode_copy) {
case SAFETY_SILENT:
set_intercept_relay(false);
#ifdef vw
// Volkswagen community port:
// J533 integrations with White/Grey Panda really need Panda to respond
// at all times. Let the CAN transceivers ACK traffic unless this is
// BP/Uno where the physical relay makes it irrelevant. This makes
// SILENT identical to NOOUTPUT for White/Grey Panda.
if (board_has_obd()) {
current_board->set_can_mode(CAN_MODE_NORMAL);
can_silent = ALL_CAN_SILENT;
} else {
can_silent = ALL_CAN_LIVE;
}
#else
if (board_has_obd()) {
current_board->set_can_mode(CAN_MODE_NORMAL);
}
can_silent = ALL_CAN_SILENT;
#endif
break;
case SAFETY_NOOUTPUT:
set_intercept_relay(false);
+7
View File
@@ -28,7 +28,14 @@ void set_power_save_state(int state) {
enable = true;
}
#ifdef vw
// Volkswagen community port:
// If this is a White or Grey Panda, always keep the CAN transceivers
// powered up so that transparent forwarding is maintained.
current_board->enable_can_transceivers(board_has_obd() ? enable : true);
#else
current_board->enable_can_transceivers(enable);
#endif
// Switch EPS/GPS
if (enable) {