|
|
@ -5,6 +5,7 @@ import time |
|
|
|
from statistics import mean |
|
|
|
from statistics import mean |
|
|
|
|
|
|
|
|
|
|
|
from cereal import log |
|
|
|
from cereal import log |
|
|
|
|
|
|
|
from common.realtime import sec_since_boot |
|
|
|
from selfdrive.swaglog import cloudlog |
|
|
|
from selfdrive.swaglog import cloudlog |
|
|
|
|
|
|
|
|
|
|
|
PANDA_OUTPUT_VOLTAGE = 5.28 |
|
|
|
PANDA_OUTPUT_VOLTAGE = 5.28 |
|
|
@ -67,7 +68,7 @@ class PowerMonitoring: |
|
|
|
# Calculation tick |
|
|
|
# Calculation tick |
|
|
|
def calculate(self, health): |
|
|
|
def calculate(self, health): |
|
|
|
try: |
|
|
|
try: |
|
|
|
now = time.time() |
|
|
|
now = sec_since_boot() |
|
|
|
|
|
|
|
|
|
|
|
# Check that time is valid |
|
|
|
# Check that time is valid |
|
|
|
if datetime.datetime.fromtimestamp(now).year < 2019: |
|
|
|
if datetime.datetime.fromtimestamp(now).year < 2019: |
|
|
|