Files
dragonpilot/selfdrive/hardware/tici/precise_power_measure.py
Adeeb Shihadeh 37dbc7be0c CI: power draw test (#24292)
* CI: power draw test

* initialize hardware

* try this

* fix that

* happy linter

* actually happy

Co-authored-by: Comma Device <device@comma.ai>
2022-04-21 23:13:20 -07:00

10 lines
279 B
Python
Executable File

#!/usr/bin/env python3
import numpy as np
from selfdrive.hardware.tici.power_monitor import sample_power
if __name__ == '__main__':
print("measuring for 5 seconds")
for _ in range(3):
pwrs = sample_power()
print("mean %.2f std %.2f" % (np.mean(pwrs), np.std(pwrs)))