-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsettings_json.py
39 lines (31 loc) · 1.39 KB
/
settings_json.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import json
""" Key: description of port/board. Value: the true device path """
board_names = {
'Use Manual Entry' : 'use_man',
'Launchpad - tty.usbserial-TIXRGQDLB' : '/dev/tty.usbserial-TIXRGQDLB',
'0.4C - cu.usbserial-A700eYE7' : '/dev/cu.usbserial-A700eYE7',
'0.4x - tty.usbserial-A50285BI' : '/dev/tty.usbserial-A50285BI',
'0.5A - cu.usbserial-DN02I8UQ' : '/dev/cu.usbserial-DN02I8UQ',
'0.5C - cu.usbserial-DN02I8UP' : '/dev/cu.usbserial-DN02I8UP',
'0.5D - cu.usbserial-DN04IW1O' : '/dev/cu.usbserial-DN04IW1O',
'0.5E - cu.usbserial-DN04IW1N' : '/dev/cu.usbserial-DN04IW1N',
'Windows - COM7' : 'COM7',
'Internal Simulator' : 'simulator'
}
settings_json = json.dumps([
{'type': 'title',
'title': ''},
{'type': 'title',
'title': 'Select a serial port or change to "Use Manual Entry and enter a string"'},
{'type': 'options',
'title': 'UART Port',
'desc': 'Location of the USB-Serial device, in /dev (Mac/Linux) or COMx (Windows)',
'section': 'houston_settings',
'key':'uart_options',
'options': list(board_names.keys())},
{'type': 'string',
'title': 'UART Port - Manual Entry',
'desc': "Enter device location ex: /dev/tty.usbserial123 ",
'section': 'houston_settings',
'key':'uart_string'},
])