Merge pull request #8 from Loris1123/master

Extended CAN IDs for FromCanUtilsLog. Thank you Loris1123!
This commit is contained in:
brent-stone 2020-07-13 16:45:59 -04:00 committed by GitHub
commit 1d2a73fe85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -1,12 +1,10 @@
import re
def canUtilsToTSV(filename):
outFileName = filename + ".tsv"
with open(outFileName, "w") as outFile:
with open(filename, "r") as file:
linePattern = re.compile(
r"\((\d+.\d+)\)\s+[^\s]+\s+(.{3})#([0-9A-F]+)")
linePattern = re.compile(r"\((\d+.\d+)\)\s+[^\s]+\s+(.{3}|.{8})#([0-9A-F]+)")
while True:
line = file.readline()

View File

@ -1,6 +1,6 @@
import matplotlib.pyplot as plt
from matplotlib.pyplot import savefig
from numpy import where, isin
from numpy import where, isin, ndarray
from os import chdir, mkdir, path
from shutil import rmtree
from PipelineTimer import PipelineTimer
@ -39,6 +39,10 @@ def plot_signals_by_arb_id(a_timer: PipelineTimer, arb_id_dict: dict, signal_dic
signals_to_plot.append(signal)
# One row per signal plus one for the TANG
fig, axes = plt.subplots(nrows=1 + len(signals_to_plot), ncols=1)
if not isinstance(axes, ndarray):
print("Static signal. No figures to plot")
continue
plt.suptitle("Time Series and TANG for Arbitration ID " + hex(k_id),
weight='bold',
position=(0.5, 1))

3
requirements.txt Normal file
View File

@ -0,0 +1,3 @@
scikit-learn
pandas
matplotlib