Skip to content

Commit

Permalink
mess with more stuff to try to make powermon optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmcorvidae committed Aug 11, 2024
1 parent 6757f5c commit 40d03a6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions meshtastic/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@
from meshtastic.slog import LogSet
have_powermon = True
powermon_exception = None
meter: Optional[PowerMeter] = None
except ImportError as e:
have_powermon = False
powermon_exception = e
meter = None
from meshtastic.protobuf import channel_pb2, config_pb2, portnums_pb2
from meshtastic.version import get_active_version

meter: Optional[PowerMeter] = None


def onReceive(packet, interface):
"""Callback invoked when a packet arrives"""
args = mt_config.args
Expand Down Expand Up @@ -897,7 +896,7 @@ def setSimpleConfig(modem_preset):
qr = pyqrcode.create(url)
print(qr.terminal())

log_set: Optional[LogSet] = None # type: ignore[annotation-unchecked]
log_set: Optional = None # type: ignore[annotation-unchecked]
# we need to keep a reference to the logset so it doesn't get GCed early

if args.slog or args.power_stress:
Expand Down

0 comments on commit 40d03a6

Please sign in to comment.