Skip to content

Commit 3c76e19

Browse files
committed
poll for power readings much more rapidly - traces now look great
1 parent 7e007e7 commit 3c76e19

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

meshtastic/powermon/ppk2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def measurement_loop(self):
6363
"""Endless measurement loop will run in a thread."""
6464
while self.measuring:
6565
with self.want_measurement:
66-
self.want_measurement.wait(0.0001 if self.num_data_reads == 0 else 0.01)
66+
self.want_measurement.wait(0.0001 if self.num_data_reads == 0 else 0.001)
6767
# normally we poll using this timeout, but sometimes
6868
# reset_measurement() will notify us to read immediately
6969

meshtastic/slog/slog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(self, code: str, fields: list[tuple[str, pa.DataType]]) -> None:
7171
class PowerLogger:
7272
"""Logs current watts reading periodically using PowerMeter and ArrowWriter."""
7373

74-
def __init__(self, pMeter: PowerMeter, file_path: str, interval=0.2) -> None:
74+
def __init__(self, pMeter: PowerMeter, file_path: str, interval=0.01) -> None:
7575
"""Initialize the PowerLogger object."""
7676
self.pMeter = pMeter
7777
self.writer = FeatherWriter(file_path)

0 commit comments

Comments
 (0)