remove some dead code, move comment

master
George Hotz 2017-04-17 15:28:28 -07:00
parent 5959729227
commit a3045252ab
3 changed files with 19 additions and 22 deletions

View File

@ -55,6 +55,11 @@ cd boardesp
make make
``` ```
Debugging
------
To print out the serial console from the STM32, run tests/debug_console.py
Hardware Hardware
------ ------
Check out the hardware [guide](https://github.com/commaai/panda/blob/master/docs/guide.pdf) Check out the hardware [guide](https://github.com/commaai/panda/blob/master/docs/guide.pdf)

View File

@ -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) { void safety_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
// state machine to enter and exit controls // state machine to enter and exit controls
// 0x1A6 for the ILX, 0x296 for the Civic Touring // 0x1A6 for the ILX, 0x296 for the Civic Touring

View File

@ -305,19 +305,6 @@ void CAN3_TX_IRQHandler() {
} }
#endif #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 // CAN receive handlers
// blink blue when we are receiving CAN messages // blink blue when we are receiving CAN messages
void can_rx(CAN_TypeDef *CAN, int can_number) { void can_rx(CAN_TypeDef *CAN, int can_number) {
@ -819,8 +806,7 @@ int main() {
set_led(LED_RED, 1); set_led(LED_RED, 1);
delay(2000000); delay(2000000);
// ESP io proxy // turn off the blue LED, turned on by CAN
//set_led(LED_BLUE, !(GPIOB->IDR&1));
set_led(LED_BLUE, 0); set_led(LED_BLUE, 0);
#ifdef ENABLE_SPI #ifdef ENABLE_SPI
@ -849,13 +835,6 @@ int main() {
// turn off fan // turn off fan
set_fan_speed(0); 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; return 0;