diff --git a/Read-Sensor-Resistances/Scripts/python.exe b/Read-Sensor-Resistances/Scripts/python.exe
new file mode 100644
index 0000000..3125937
Binary files /dev/null and b/Read-Sensor-Resistances/Scripts/python.exe differ
diff --git a/make.bat b/make.bat
index 26cf67a..e3018c3 100644
--- a/make.bat
+++ b/make.bat
@@ -28,6 +28,5 @@ GOTO End
:run
%env%\Scripts\python test.py
- pause
:End
\ No newline at end of file
diff --git a/sealammonia.fbp b/sealammonia.fbp
index 959ca3e..e0ffe44 100644
--- a/sealammonia.fbp
+++ b/sealammonia.fbp
@@ -44,7 +44,7 @@
470,330
Frame
- 470,330
+ 470,380
wxDEFAULT_FRAME_STYLE
@@ -934,7 +934,7 @@
5
1
1
- wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL
+ wxALIGN_CENTER_VERTICAL|wxALL
0
1
-
+
5
1
0
wxALL|wxALIGN_RIGHT
2
1
-
+
1
1
1
@@ -1376,14 +1376,14 @@
-
+
5
1
1
wxALL
2
1
-
+
1
1
1
@@ -1470,6 +1470,183 @@
+
+ 5
+ 1
+ 0
+ wxALL|wxALIGN_RIGHT
+ 3
+ 1
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ File Location
+
+ 0
+
+
+ 0
+
+ 1
+ fileLocPrompt
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+
+
+ -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ 1
+ 1
+ wxALL
+ 3
+ 1
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+ Select a folder
+
+ 0
+
+ 1
+ dir
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+ wxDIRP_DEFAULT_STYLE
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+ RecordedData
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test.py b/test.py
index 249a491..52909e1 100644
--- a/test.py
+++ b/test.py
@@ -40,7 +40,7 @@ def main():
# filename, disable customize name but should inform the user the current name of the data file on the front end
# alternatively, could be default input if no other input given. But if there is might have problem...
- dat_folder = "RecordedData"
+ dat_folder = frame.dir.GetPath()
os.makedirs(dat_folder, exist_ok=True)
filename = os.path.join(os.getcwd(), dat_folder, f"{datetime.now().strftime('%Y-%m-%d_%H%M%S')}.csv")
delay = 1000 # millisec per data point, defined in the firmware
diff --git a/ui.py b/ui.py
index c11817b..8e0bf8c 100644
--- a/ui.py
+++ b/ui.py
@@ -17,7 +17,7 @@ import wx.xrc
class Frame ( wx.Frame ):
def __init__( self, parent ):
- wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 470,330 ), style = wx.DEFAULT_FRAME_STYLE )
+ wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 470,380 ), style = wx.DEFAULT_FRAME_STYLE )
self.SetSizeHintsSz( wx.Size( 470,330 ), wx.DefaultSize )
self.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNTEXT ) )
@@ -77,7 +77,7 @@ class Frame ( wx.Frame ):
self.input_voltage = wx.TextCtrl( v_entre.GetStaticBox(), wx.ID_ANY, u"3.3", wx.DefaultPosition, wx.DefaultSize, 0 )
self.input_voltage.SetToolTipString( u"Input voltage of the resistors, default 3.3 volts" )
- gbSizer8.Add( self.input_voltage, wx.GBPosition( 0, 1 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 5 )
+ gbSizer8.Add( self.input_voltage, wx.GBPosition( 0, 1 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
self.unit3 = wx.StaticText( v_entre.GetStaticBox(), wx.ID_ANY, u"Volts", wx.DefaultPosition, wx.DefaultSize, 0 )
self.unit3.Wrap( -1 )
@@ -87,10 +87,10 @@ class Frame ( wx.Frame ):
self.sizer_prompt.Wrap( -1 )
gbSizer8.Add( self.sizer_prompt, wx.GBPosition( 1, 0 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT, 5 )
- self.m_textCtrl26 = wx.TextCtrl( v_entre.GetStaticBox(), wx.ID_ANY, u"10", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_textCtrl26 = wx.TextCtrl( v_entre.GetStaticBox(), wx.ID_ANY, u"50", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_textCtrl26.SetToolTipString( u"Window size for the plot window. If want infinite/maximum size, type 0" )
- gbSizer8.Add( self.m_textCtrl26, wx.GBPosition( 1, 1 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_CENTER_HORIZONTAL|wx.TOP|wx.RIGHT|wx.LEFT, 5 )
+ gbSizer8.Add( self.m_textCtrl26, wx.GBPosition( 1, 1 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.TOP|wx.RIGHT|wx.LEFT, 5 )
self.font_prompt = wx.StaticText( v_entre.GetStaticBox(), wx.ID_ANY, u"Font Size", wx.DefaultPosition, wx.DefaultSize, 0 )
self.font_prompt.Wrap( -1 )
@@ -99,6 +99,13 @@ class Frame ( wx.Frame ):
self.fontSize = wx.TextCtrl( v_entre.GetStaticBox(), wx.ID_ANY, u"16", wx.DefaultPosition, wx.DefaultSize, 0 )
gbSizer8.Add( self.fontSize, wx.GBPosition( 2, 1 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
+ self.fileLocPrompt = wx.StaticText( v_entre.GetStaticBox(), wx.ID_ANY, u"File Location", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.fileLocPrompt.Wrap( -1 )
+ gbSizer8.Add( self.fileLocPrompt, wx.GBPosition( 3, 0 ), wx.GBSpan( 1, 1 ), wx.ALL|wx.ALIGN_RIGHT, 5 )
+
+ self.dir = wx.DirPickerCtrl( v_entre.GetStaticBox(), wx.ID_ANY, u"RecordedData", u"Select a folder", wx.DefaultPosition, wx.DefaultSize, wx.DIRP_DEFAULT_STYLE )
+ gbSizer8.Add( self.dir, wx.GBPosition( 3, 1 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
+
v_entre.Add( gbSizer8, 1, wx.ALIGN_CENTER|wx.TOP, 5 )