mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
Power saving refactor (#389)
* Exit power saving also for CAN based ingition detection and replace interrup with simple state machine. a bit of delay it's fine * bug fixes and also CDP set on start * sorry misra * move comment * typo * remove ignition interrupts * Power saving state machine should be done by boardd, which also sets safety modes and usb power modes * typo * Added usb command for power save state setting * Added power save enabled packet * Added power_save_enabled to python lib too
This commit is contained in:
@@ -347,7 +347,7 @@ class Panda(object):
|
||||
|
||||
def health(self):
|
||||
dat = self._handle.controlRead(Panda.REQUEST_IN, 0xd2, 0, 0, 28)
|
||||
a = struct.unpack("IIIIIBBBBBBBB", dat)
|
||||
a = struct.unpack("IIIIIBBBBBBBBB", dat)
|
||||
return {
|
||||
"voltage": a[0],
|
||||
"current": a[1],
|
||||
@@ -361,7 +361,8 @@ class Panda(object):
|
||||
"car_harness_status": a[9],
|
||||
"usb_power_mode": a[10],
|
||||
"safety_mode": a[11],
|
||||
"fault_status": a[12]
|
||||
"fault_status": a[12],
|
||||
"power_save_enabled": a[13]
|
||||
}
|
||||
|
||||
# ******************* control *******************
|
||||
|
||||
Reference in New Issue
Block a user