commaai / panda

code powering the comma.ai panda
MIT License
1.53k stars 776 forks source link

IR LEDs constantly on with GM #621

Closed VirtuallyChris closed 3 years ago

VirtuallyChris commented 3 years ago

Volt people have a different ignition detection that detects CAN messages on the bus instead of detecting a rise in the ignition line. Due to this, the IR LEDs never turn off. (at least is what it seems like!) Confirmed with several GM users on Discord that this happens to them, and they're forced to unplug their devices after each drive. image

robbederks commented 3 years ago

I briefly looked into this a few weeks ago, and none of the logic about when to turn the IR LEDs on/off is in the panda (except for the heartbeat being missing turning them off). Also looked into the openpilot side, but there the remainder of the code seems to be shared between both ignition types when the health packet comes in. Requires more investigation!

dibble9012 commented 3 years ago

Happens to me Device Dongle ID: 970dccbaef8569a7 2017 Chevy Volt

ErikRNissen commented 3 years ago

I’m seeing this on a2018 volt as well. Any time I check the interior cam the ir LEDs appear to be on BF448826-0861-4095-8245-7A8E8CAE4454

Verylukyguy commented 3 years ago

Happens to me.

Dongle ID: e38a02cae1ef1e0c

2018 GMC Acadia Denali AWD

jeffpicard commented 3 years ago

+1 Dongle ID: 9b7062f1d55b8e78 2017 Chevy Volt

My comma2 shuts off if i haven't driven the car for around 2 days. Ditto ErikRNissen -- my interior cam always shows the IR lights on.

robbederks commented 3 years ago

Thanks for the reports, we're going to look into this issue further.

As far as the IR being on while taking a snapshot, that's completely expected behavior and not indicative of any issues. The problem this issue is about is the IR being on while the device is offroad / idle. When taking a snapshot, the IR LEDs turn on for a brief duration.

robbederks commented 3 years ago

Dug a little deeper and found the issue. The issue is indeed related to the panda code.

The IR PWM controller uses timer 4 (TIM4), which apparently is also used by the GMLAN bitbanging driver. Will move the GMLAN bitbanging to a different timer to fix this issue. PR coming soon!

dibble9012 commented 3 years ago

Awesome!!! Now I don’t have to worry about a dead battery after three days. Thank you!