mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-21 13:03:53 +08:00
* use OP prefix for logmessage
* cleanup paths too
* cleanup the paths too
* add hw.py to release
* fix those issues
* fix unittests
* fix unittests
* fix unittests
* do swaglog_ipc properly across all the files
* fix that
* fix swaglog in c++
* review suggestions
old-commit-hash: bfe990b112
28 lines
725 B
Python
Executable File
28 lines
725 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""Script to fill up storage with fake data"""
|
|
|
|
from pathlib import Path
|
|
|
|
from openpilot.system.hardware.hw import Paths
|
|
from openpilot.system.loggerd.config import get_available_percent
|
|
from openpilot.system.loggerd.tests.loggerd_tests_common import create_random_file
|
|
|
|
|
|
if __name__ == "__main__":
|
|
segment_idx = 0
|
|
while True:
|
|
seg_name = f"1970-01-01--00-00-00--{segment_idx}"
|
|
seg_path = Path(Paths.log_root()) / seg_name
|
|
|
|
print(seg_path)
|
|
|
|
create_random_file(seg_path / "fcamera.hevc", 36)
|
|
create_random_file(seg_path / "rlog.bz2", 2)
|
|
|
|
segment_idx += 1
|
|
|
|
# Fill up to 99 percent
|
|
available_percent = get_available_percent()
|
|
if available_percent < 1.0:
|
|
break
|