diff --git a/Test cases.xlsx b/Test cases.xlsx deleted file mode 100644 index da0c57a..0000000 Binary files a/Test cases.xlsx and /dev/null differ diff --git a/Arduino/README_arduino.md b/src/arduino/README_arduino.md similarity index 100% rename from Arduino/README_arduino.md rename to src/arduino/README_arduino.md diff --git a/Arduino/__init__.py b/src/arduino/__init__.py similarity index 100% rename from Arduino/__init__.py rename to src/arduino/__init__.py diff --git a/Arduino/arduino.py b/src/arduino/arduino.py similarity index 100% rename from Arduino/arduino.py rename to src/arduino/arduino.py diff --git a/Arduino/prototype.ino b/src/arduino/prototype.ino similarity index 100% rename from Arduino/prototype.ino rename to src/arduino/prototype.ino diff --git a/cage_func.py b/src/cage_func.py similarity index 98% rename from cage_func.py rename to src/cage_func.py index da7dbb1..7ae72bb 100644 --- a/cage_func.py +++ b/src/cage_func.py @@ -8,9 +8,9 @@ import traceback from tkinter import messagebox # import other project files -from User_Interface import ui_print -from pyps2000b import PS2000B -from Arduino import Arduino +from user_interface import ui_print +from ps2000b import PS2000B +from arduino import Arduino import config_handling as config import globals as g @@ -192,8 +192,8 @@ class ArduinoCtrl(Arduino): axis.polarity_switched = "False" # set attribute in axis object accordingly except Exception as e: # some error occurred while trying to read status, usually arduino is disconnected # show warning messages to alert user - ui_print("Error with Arduino:", e) - messagebox.showerror("Error with Arduino!", "Connection Error with Arduino: \n%s" % e) + ui_print("Error with arduino:", e) + messagebox.showerror("Error with arduino!", "Connection Error with arduino: \n%s" % e) for axis in g.AXES: # set polarity switch attributes in axis objects to "Unknown" axis.polarity_switched = "Unknown" self.connected = "Connection Error" # update own connection status @@ -347,7 +347,7 @@ def shut_down_all(): # safe shutdown at program end or on error ui_print("Z PSU not connected, can't deactivate.") message += "\nZ PSU not connected, can't deactivate." - # Shut down Arduino: + # Shut down arduino: try: g.ARDUINO.safe() # call safe method in ArduinoCtrl class (all relay pins to LOW) except BaseException as e: # some error occurred diff --git a/config_handling.py b/src/config_handling.py similarity index 99% rename from config_handling.py rename to src/config_handling.py index 66ef1fd..3b49065 100644 --- a/config_handling.py +++ b/src/config_handling.py @@ -9,7 +9,7 @@ from tkinter import messagebox import globals as g import cage_func as func # noinspection PyPep8Naming -import User_Interface as ui +import user_interface as ui global CONFIG_FILE # string storing the path of the used config file global CONFIG_OBJECT # object of type ConfigParser(), storing all configuration information diff --git a/csv_logging.py b/src/csv_logging.py similarity index 98% rename from csv_logging.py rename to src/csv_logging.py index a04636e..3f20df5 100644 --- a/csv_logging.py +++ b/src/csv_logging.py @@ -1,5 +1,5 @@ # This file contains functions related to logging data from the program to a CSV file. -# They are mainly but not only called by the ConfigureLogging class in User_Interface.py. +# They are mainly but not only called by the ConfigureLogging class in user_interface.py. # import packages import pandas as pd @@ -10,7 +10,7 @@ from tkinter import messagebox # import other project files import globals as g -import User_Interface as ui +import user_interface as ui log_data = pd.DataFrame() # pandas data frame containing the logged data, in-program representation of csv/excel data unsaved_data = False # Bool to indicate if there is unsaved data, set to True each time a datapoint is logged diff --git a/csv_threading.py b/src/csv_threading.py similarity index 99% rename from csv_threading.py rename to src/csv_threading.py index 7793dcf..e98ee43 100644 --- a/csv_threading.py +++ b/src/csv_threading.py @@ -11,7 +11,7 @@ from tkinter import messagebox import matplotlib.pyplot as plt # import other project files: -import User_Interface as ui +import user_interface as ui import cage_func as func import globals as g diff --git a/globals.py b/src/globals.py similarity index 94% rename from globals.py rename to src/globals.py index 46e8024..e38c910 100644 --- a/globals.py +++ b/src/globals.py @@ -44,8 +44,8 @@ default_arrays = { } # Dictionary for PSU serial ports: default_ports = { - "xy_port": "COM1", # Default serial port where PSU for X- and Y-Axes is connected - "z_port": "COM2", # Default serial port where PSU for Z-Axis is connected + "xy_port": "COM8", # Default serial port where PSU for X- and Y-Axes is connected + "z_port": "COM5", # Default serial port where PSU for Z-Axis is connected } # Configuration for socket interface diff --git a/main.py b/src/main.py similarity index 97% rename from main.py rename to src/main.py index 40275c5..25421a8 100644 --- a/main.py +++ b/src/main.py @@ -7,9 +7,9 @@ from tkinter import messagebox # import other project files: import cage_func as func -from User_Interface import HelmholtzGUI -from User_Interface import ui_print -import User_Interface as ui +from user_interface import HelmholtzGUI +from user_interface import ui_print +import user_interface as ui import globals as g import config_handling as config import csv_logging as log diff --git a/pyps2000b/LICENSE b/src/ps2000b/LICENSE similarity index 100% rename from pyps2000b/LICENSE rename to src/ps2000b/LICENSE diff --git a/pyps2000b/PS2000B.py b/src/ps2000b/PS2000B.py similarity index 100% rename from pyps2000b/PS2000B.py rename to src/ps2000b/PS2000B.py diff --git a/pyps2000b/README.md b/src/ps2000b/README.md similarity index 100% rename from pyps2000b/README.md rename to src/ps2000b/README.md diff --git a/pyps2000b/__init__.py b/src/ps2000b/__init__.py similarity index 100% rename from pyps2000b/__init__.py rename to src/ps2000b/__init__.py diff --git a/socket_control.py b/src/socket_control.py similarity index 99% rename from socket_control.py rename to src/socket_control.py index 24630c2..1de51c0 100644 --- a/socket_control.py +++ b/src/socket_control.py @@ -1,5 +1,5 @@ import globals as g -from User_Interface import ui_print +from user_interface import ui_print import cage_func as cage_controls from threading import Thread diff --git a/User_Interface.py b/src/user_interface.py similarity index 100% rename from User_Interface.py rename to src/user_interface.py diff --git a/test.csv b/test.csv deleted file mode 100644 index dfe124f..0000000 --- a/test.csv +++ /dev/null @@ -1,4 +0,0 @@ -Date;Time;t (s);X PSU Status;Y PSU Status;Z PSU Status;X Voltage Setpoint;Y Voltage Setpoint;Z Voltage Setpoint;X Actual Voltage;Y Actual Voltage;Z Actual Voltage;X Current Setpoint;Y Current Setpoint;Z Current Setpoint;X Actual Current;Y Actual Current;Z Actual Current;X Target Field;Y Target Field;Z Target Field;X Trgt. Field Raw;Y Trgt. Field Raw;Z Trgt. Field Raw;X Target Current;Y Target Current;Z Target Current;X Inverted;Y Inverted;Z Inverted -2021-03-22;10:58:32,248216;0,0;Not Connected;Not Connected;Not Connected;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;Unknown;Unknown;Unknown -2021-03-22;10:58:33,262910;1,014694;Not Connected;Not Connected;Not Connected;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;Unknown;Unknown;Unknown -2021-03-22;10:58:34,271188;2,022972;Not Connected;Not Connected;Not Connected;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;Unknown;Unknown;Unknown