This commit is contained in:
geeksville
2020-09-25 16:50:24 -07:00
parent 13be218620
commit cca38a04ee
5 changed files with 372 additions and 118 deletions

View File

@@ -26,7 +26,7 @@
</summary>
<pre><code class="python">import logging
from . import util
from . import StreamInterface, BROADCAST_NUM
from . import SerialInterface, BROADCAST_NUM
from pubsub import pub
import time
import sys
@@ -154,7 +154,7 @@ def testAll():
pub.subscribe(onConnection, &#34;meshtastic.connection&#34;)
pub.subscribe(onReceive, &#34;meshtastic.receive&#34;)
global interfaces
interfaces = list(map(lambda port: StreamInterface(
interfaces = list(map(lambda port: SerialInterface(
port, debugOut=openDebugLog(port), connectNow=False), ports))
for i in interfaces:
i.connect()
@@ -288,7 +288,7 @@ def testAll():
pub.subscribe(onConnection, &#34;meshtastic.connection&#34;)
pub.subscribe(onReceive, &#34;meshtastic.receive&#34;)
global interfaces
interfaces = list(map(lambda port: StreamInterface(
interfaces = list(map(lambda port: SerialInterface(
port, debugOut=openDebugLog(port), connectNow=False), ports))
for i in interfaces:
i.connect()