Skip to content
Snippets Groups Projects
Commit 29b1a9dc authored by Jeshon Assunçao's avatar Jeshon Assunçao
Browse files

Fix some bugs appearing on Windows

parent c30ec7d7
Branches
No related tags found
1 merge request!1Resolve "Multios usage"
......@@ -29,7 +29,9 @@ def plot(name, values, path, datetime, filename, current_color):
axe = "0" + str(axe)
plt.plot(range(len(values)), values, color='#A0'+axe+axe)
filepath = path + "/" + name + "/" + filename + "/" + str(datetime) + '.png'
datetime = str(datetime).replace('.', '_')
datetime = str(datetime).replace(':', '-')
filepath = os.path.join(path, name, filename, datetime + '.png')
create_path(filepath)
plt.savefig(filepath)
......@@ -51,7 +53,7 @@ def charge_iteration(charge_items, filename):
ambiant_temp = format_temperature(item[1][0][0]) # temperature: 4 ~24 ~43
datetime = convert_matlab_datetime_vector_to_utc(item[2][0])
path = "output_graphs/charges/degree" + str(ambiant_temp)
path = os.path.join("output_graphs", "charges", "degree" + str(ambiant_temp))
voltage_measured = item[3][0][0][0][0] # Battery terminal voltage (Volts) floats
current_measured = item[3][0][0][1][0] # Battery output current (Amps) floats
......@@ -139,9 +141,9 @@ def main():
# TODO warning for for the [:1]
for filepath in filepaths[:1]:
filename = filepath.split("/")[-1].split(".")[0]
print(filename)
filename = filepath.split("\\")[-1].split(".")[0]
raw_mat = scipy.io.loadmat(filepath)
mat = raw_mat[filename][0][0][0][0]
impedance_items = filter_mat(mat, "impedance")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment