GM openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 100 supported car makes and models.
MIT License
57
stars
39
forks
source link
Investigate using the ignition pin to bitbang lowspeed gmlan #55
The relay and ignition pins are both GPIO and are opposite in the connector. It might be possible to repurpose the ignition detect line to bitbang the single wire lowspeed can the same way it was done in the grey and white pandas.
While this doesn't offer bidirectional lowspeed communication, it would at least restore the dash icons.
bool harness_check_ignition(void) {
bool ret = false;
switch(car_harness_status){
case HARNESS_STATUS_NORMAL:
ret = !get_gpio_input(current_board->harness_config->GPIO_SBU1, current_board->harness_config->pin_SBU1);
break;
case HARNESS_STATUS_FLIPPED:
ret = !get_gpio_input(current_board->harness_config->GPIO_SBU2, current_board->harness_config->pin_SBU2);
break;
default:
break;
}
return ret;
}
The relay and ignition pins are both GPIO and are opposite in the connector. It might be possible to repurpose the ignition detect line to bitbang the single wire lowspeed can the same way it was done in the grey and white pandas.
While this doesn't offer bidirectional lowspeed communication, it would at least restore the dash icons.
bool harness_check_ignition(void) { bool ret = false; switch(car_harness_status){ case HARNESS_STATUS_NORMAL: ret = !get_gpio_input(current_board->harness_config->GPIO_SBU1, current_board->harness_config->pin_SBU1); break; case HARNESS_STATUS_FLIPPED: ret = !get_gpio_input(current_board->harness_config->GPIO_SBU2, current_board->harness_config->pin_SBU2); break; default: break; } return ret; }