mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 21:14:01 +08:00
* add pyupgrade hook * run pyupgrade (pre-commit run -a) * ruff --fix * Revert "add pyupgrade hook" This reverts commit 56ec18bb6b8602a0b612f3803d96cdad14b52066. * revert changes to third_party/ * manual type fixes * explicit Optional wrapping capnp objects
10 lines
284 B
Python
Executable File
10 lines
284 B
Python
Executable File
#!/usr/bin/env python3
|
|
import numpy as np
|
|
from openpilot.system.hardware.tici.power_monitor import sample_power
|
|
|
|
if __name__ == '__main__':
|
|
print("measuring for 5 seconds")
|
|
for _ in range(3):
|
|
pwrs = sample_power()
|
|
print(f"mean {np.mean(pwrs):.2f} std {np.std(pwrs):.2f}")
|