mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-01 03:43:46 +08:00
Squashed 'panda/' changes from 39c1e39e..06958e42
06958e42 Fix pedal bootstub build f5817e6b Fix Pedal bootstub version c00fe867 CircleCI needs to check bootstub doesn't break too 9b5b696e Subaru: remove GM leftover 20c76ad5 Power Saving (#169) c6eeaad6 Subaru: added last engage/disengage regression test 37d46e0c Subaru: added subaru safety tests 5686dae2 Subaru updated driver factor a6193a82 Dcp remove (#168) e437b9b4 Subaru: fixed bug and added safety tests 176f1325 Subaru: added proper safety model 0b10bb70 Subaru safety: move camera to bus 2 bce279a6 Pedal: only one firmware (#164) 4f73cb48 Toyota pedal: checking for no pedal being commanded when openpilot is off 0b2327e5 Merge pull request #160 from commaai/capture_make_failure 7b504d2f panda safety test that replays drives of saved CAN messages (#151) d7d08892 Capture make failure so it can be logged to sentry git-subtree-dir: panda git-subtree-split: 06958e424cad7efa3fb35d262480c29817733059
This commit is contained in:
+7
-4
@@ -539,6 +539,9 @@ int main() {
|
||||
} else {
|
||||
// enable ESP uart
|
||||
uart_init(USART1, 115200);
|
||||
#ifdef EON
|
||||
set_esp_mode(ESP_DISABLED);
|
||||
#endif
|
||||
}
|
||||
// enable LIN
|
||||
uart_init(UART5, 10400);
|
||||
@@ -590,8 +593,6 @@ int main() {
|
||||
uint64_t marker = 0;
|
||||
#define CURRENT_THRESHOLD 0xF00
|
||||
#define CLICKS 8
|
||||
// Enough clicks to ensure that enumeration happened. Should be longer than bootup time of the device connected to EON
|
||||
#define CLICKS_BOOTUP 30
|
||||
#endif
|
||||
|
||||
for (cnt=0;;cnt++) {
|
||||
@@ -618,8 +619,9 @@ int main() {
|
||||
}
|
||||
break;
|
||||
case USB_POWER_CDP:
|
||||
// been CLICKS_BOOTUP clicks since we switched to CDP
|
||||
if ((cnt-marker) >= CLICKS_BOOTUP ) {
|
||||
#ifndef EON
|
||||
// been CLICKS clicks since we switched to CDP
|
||||
if ((cnt-marker) >= CLICKS) {
|
||||
// measure current draw, if positive and no enumeration, switch to DCP
|
||||
if (!is_enumerated && current < CURRENT_THRESHOLD) {
|
||||
puts("USBP: no enumeration with current draw, switching to DCP mode\n");
|
||||
@@ -631,6 +633,7 @@ int main() {
|
||||
if (current >= CURRENT_THRESHOLD) {
|
||||
marker = cnt;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case USB_POWER_DCP:
|
||||
// been at least CLICKS clicks since we switched to DCP
|
||||
|
||||
Reference in New Issue
Block a user