|
Haptic Controller
|
Functions | |
| disconnect () | |
Variables | |
| str | COM_PORT = "COM11" |
| int | MESSAGES_TO_SAMPLE = 1000 |
| str | LOCAL_FILENAME = "debug_log.txt" |
| ser | |
| f = open(LOCAL_FILENAME, "w") | |
| int | messages_counted = 0 |
| line = ser.readline().decode("utf-8").strip() | |
| section_current = defaultdict(int) | |
| section_times = defaultdict(list) | |
| lines = f.readlines()[1:] | |
| segments = line.split() | |
| name | |
| action | |
| time | |
Reads data from a serial port and saves it to a local file, then analyzes the data. Make sure to set COM_PORT to the correct value before running.
| profiler.disconnect | ( | ) |
Definition at line 27 of file profiler.py.
| profiler.action |
Definition at line 57 of file profiler.py.
| str profiler.COM_PORT = "COM11" |
Definition at line 11 of file profiler.py.
| profiler.f = open(LOCAL_FILENAME, "w") |
Definition at line 32 of file profiler.py.
| profiler.line = ser.readline().decode("utf-8").strip() |
Definition at line 38 of file profiler.py.
| profiler.lines = f.readlines()[1:] |
Definition at line 52 of file profiler.py.
| str profiler.LOCAL_FILENAME = "debug_log.txt" |
Definition at line 13 of file profiler.py.
| int profiler.messages_counted = 0 |
Definition at line 35 of file profiler.py.
| int profiler.MESSAGES_TO_SAMPLE = 1000 |
Definition at line 12 of file profiler.py.
| profiler.name |
Definition at line 57 of file profiler.py.
| profiler.section_current = defaultdict(int) |
Definition at line 49 of file profiler.py.
| profiler.section_times = defaultdict(list) |
Definition at line 50 of file profiler.py.
| profiler.segments = line.split() |
Definition at line 54 of file profiler.py.
| profiler.ser |
Definition at line 15 of file profiler.py.
| profiler.time |
Definition at line 57 of file profiler.py.