From a3045252abbb25a92377b48cfd3a835d42ced5cf Mon Sep 17 00:00:00 2001 From: George Hotz Date: Mon, 17 Apr 2017 15:28:28 -0700 Subject: [PATCH] remove some dead code, move comment --- README.md | 5 +++++ board/honda_safety.h | 13 +++++++++++++ board/main.c | 23 +---------------------- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index fcf3843..08e9f05 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,11 @@ cd boardesp make ``` +Debugging +------ + +To print out the serial console from the STM32, run tests/debug_console.py + Hardware ------ Check out the hardware [guide](https://github.com/commaai/panda/blob/master/docs/guide.pdf) diff --git a/board/honda_safety.h b/board/honda_safety.h index 1a29ba7..db20f0e 100644 --- a/board/honda_safety.h +++ b/board/honda_safety.h @@ -1,3 +1,16 @@ +// board enforces +// in-state +// accel set/resume +// out-state +// cancel button + + +// all commands: brake and steering +// if controls_allowed +// allow all commands up to limit +// else +// block all commands that produce actuation + void safety_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) { // state machine to enter and exit controls // 0x1A6 for the ILX, 0x296 for the Civic Touring diff --git a/board/main.c b/board/main.c index 7c092dc..8901501 100644 --- a/board/main.c +++ b/board/main.c @@ -305,19 +305,6 @@ void CAN3_TX_IRQHandler() { } #endif -// board enforces -// in-state -// accel set/resume -// out-state -// cancel button - - -// all commands: brake and steering -// if controls_allowed -// allow all commands up to limit -// else -// block all commands that produce actuation - // CAN receive handlers // blink blue when we are receiving CAN messages void can_rx(CAN_TypeDef *CAN, int can_number) { @@ -819,8 +806,7 @@ int main() { set_led(LED_RED, 1); delay(2000000); - // ESP io proxy - //set_led(LED_BLUE, !(GPIOB->IDR&1)); + // turn off the blue LED, turned on by CAN set_led(LED_BLUE, 0); #ifdef ENABLE_SPI @@ -849,13 +835,6 @@ int main() { // turn off fan set_fan_speed(0); } - - // if we've been on for a bit and we didn't connect on USB, power up the ESP - // TODO: make better logic for this - /*if (cnt > 5 && !did_usb_enumerate) { - // enable the ESP, disable ESP boot mode - GPIOC->ODR = (1 << 14) | (1 << 5); - }*/ } return 0;