Ensure interface is connected before proceeding
This commit is contained in:
parent
0141f9853d
commit
4437c69d11
1 changed files with 3 additions and 2 deletions
|
|
@ -359,18 +359,19 @@ def main ():
|
||||||
config, run_config = prepareConfig()
|
config, run_config = prepareConfig()
|
||||||
global interface
|
global interface
|
||||||
interface = SerialInterface(run_config['port'], noNodes=True) # Confirm radio is connectable
|
interface = SerialInterface(run_config['port'], noNodes=True) # Confirm radio is connectable
|
||||||
|
if not interface.devPath:
|
||||||
|
raise Exception('No interface!')
|
||||||
cuesheet = buildCueSheet(config) # Do this before sleeping so the timing is displayed
|
cuesheet = buildCueSheet(config) # Do this before sleeping so the timing is displayed
|
||||||
|
|
||||||
|
|
||||||
sleepUntilStart(config)
|
sleepUntilStart(config)
|
||||||
|
|
||||||
pub.subscribe(onStatus, 'meshtastic.log')
|
pub.subscribe(onStatus, 'meshtastic.log')
|
||||||
pub.subscribe(onReceiveText, 'meshtastic.receive.text')
|
pub.subscribe(onReceiveText, 'meshtastic.receive.text')
|
||||||
|
|
||||||
global logfile
|
global logfile
|
||||||
station = run_config['this_station']
|
station = run_config['this_station']
|
||||||
logfile = open('./' + station + '-' + str(time()) + '.jsonl', 'a')
|
logfile = open('./' + station + '-' + str(time()) + '.jsonl', 'a')
|
||||||
|
|
||||||
|
|
||||||
asyncio.run(runCues(cuesheet, run_config))
|
asyncio.run(runCues(cuesheet, run_config))
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue