Merge pull request #8 from Loris1123/master
Extended CAN IDs for FromCanUtilsLog. Thank you Loris1123!
This commit is contained in:
commit
1d2a73fe85
|
@ -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()
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
scikit-learn
|
||||
pandas
|
||||
matplotlib
|
Loading…
Reference in New Issue