Skip to content

Commit

Permalink
Merge pull request #24 from 0xjairo/master
Browse files Browse the repository at this point in the history
Clean up console output
  • Loading branch information
misdoro authored Apr 27, 2024
2 parents 4461008 + 886b606 commit be917af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 8 additions & 2 deletions data_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from os import path

from pandas import DataFrame
import pandas as pd


class DataStore:
Expand All @@ -16,9 +17,14 @@ def reset(self):
self.data = DataFrame()

def append(self, row):
print(row)
tnow = datetime.now().isoformat(sep= ' ', timespec='milliseconds')
print(f"{tnow} time_running={row['time']} is_on={row['is_on']} v={row['voltage']:.3f} i={row['current']:.3f}" \
f" Ah={row['cap_ah']:.2f} board_temp={row['temp']} i_setpoint={row['set_current']}" \
f" v_setpoint={row['set_voltage']} timer_setpoint={row['set_timer']}")
self.lastrow = row
self.data = self.data.append(row, ignore_index=True)
# self.data = self.data.append(row, ignore_index=True)
new_row_df = DataFrame([row])
self.data = pd.concat([self.data, new_row_df], ignore_index=True)

def write(self, basedir, prefix):
filename = "{}_raw_{}.csv".format(prefix, datetime.now().strftime("%Y%m%d_%H%M%S"))
Expand Down
1 change: 0 additions & 1 deletion instruments/px100.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ def probe(self):
return self.__is_number(self.getVal(PX100.VOLTAGE))

def readAll(self, read_all_aux=False):
print("readAll")
self.__clear_device()
self.update_vals(PX100.FREQ_VALS)

Expand Down

0 comments on commit be917af

Please sign in to comment.