Skip to content

Commit

Permalink
start basic gateway stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
csouers committed May 4, 2024
1 parent cedb5fd commit 3071f6c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion board/main_declarations.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bool green_led_enabled = false;
// heartbeat state
uint32_t heartbeat_counter = 0;
bool heartbeat_lost = false;
bool heartbeat_disabled = false; // set over USB
bool heartbeat_disabled = true; // set over USB

// Enter deep sleep mode
bool deepsleep_allowed = false;
Expand Down
2 changes: 1 addition & 1 deletion board/safety.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#define SAFETY_BODY 27U
#define SAFETY_HYUNDAI_CANFD 28U

uint16_t current_safety_mode = SAFETY_SILENT;
uint16_t current_safety_mode = SAFETY_ALLOUTPUT;
uint16_t current_safety_param = 0;
const safety_hooks *current_hooks = &nooutput_hooks;
const addr_checks *current_rx_checks = &default_rx_checks;
Expand Down
4 changes: 3 additions & 1 deletion board/safety/safety_defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bool alloutput_passthrough = false;

static const addr_checks* alloutput_init(uint16_t param) {
controls_allowed = true;
alloutput_passthrough = GET_FLAG(param, ALLOUTPUT_PARAM_PASSTHROUGH);
alloutput_passthrough = true; //GET_FLAG(param, ALLOUTPUT_PARAM_PASSTHROUGH);
return &default_rx_checks;
}

Expand All @@ -70,9 +70,11 @@ static int alloutput_fwd_hook(int bus_num, int addr) {
UNUSED(addr);

if (alloutput_passthrough) {
// black; ecu > skim
if (bus_num == 0) {
bus_fwd = 2;
}
// yellow; skim > ecu
if (bus_num == 2) {
bus_fwd = 0;
}
Expand Down

0 comments on commit 3071f6c

Please sign in to comment.