mirror of
https://github.com/meshtastic/python.git
synced 2025-12-30 03:17:54 -05:00
0.9.1 make it possible to see seriallog while sending text commands
for https://github.com/meshtastic/Meshtastic-python/issues/5
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -32,7 +32,8 @@ def onConnected(interface):
|
||||
try:
|
||||
if args.settime:
|
||||
print("Setting device RTC time")
|
||||
interface.sendPosition() # can include lat/long/alt etc: latitude = 37.5, longitude = -122.1
|
||||
# can include lat/long/alt etc: latitude = 37.5, longitude = -122.1
|
||||
interface.sendPosition()
|
||||
|
||||
if args.sendtext:
|
||||
print(f"Sending text message {args.sendtext} to {args.dest}")
|
||||
@@ -123,7 +124,7 @@ def main():
|
||||
args = parser.parse_args()
|
||||
logging.basicConfig(level=logging.DEBUG if args.debug else logging.INFO)
|
||||
|
||||
if args.info or args.setpref or args.sendtext:
|
||||
if (not args.seriallog) and (args.info or args.setpref or args.sendtext):
|
||||
args.seriallog = "none" # assume no debug output in this case
|
||||
|
||||
if args.test:
|
||||
@@ -131,7 +132,8 @@ def main():
|
||||
else:
|
||||
if args.seriallog == "stdout":
|
||||
logfile = sys.stdout
|
||||
elif args.seriallog == "none":
|
||||
elif not args.seriallog or args.seriallog == "none":
|
||||
args.seriallog = None
|
||||
logging.debug("Not logging serial output")
|
||||
logfile = None
|
||||
else:
|
||||
|
||||
2
setup.py
2
setup.py
@@ -10,7 +10,7 @@ with open("README.md", "r") as fh:
|
||||
# This call to setup() does all the work
|
||||
setup(
|
||||
name="meshtastic",
|
||||
version="0.7.9",
|
||||
version="0.9.1",
|
||||
description="Python API & client shell for talking to Meshtastic devices",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
|
||||
Reference in New Issue
Block a user