Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Cal Poly Solar Irradiance Microforecasting
SIMF Python GUI
Commits
044b7317
Unverified
Commit
044b7317
authored
Dec 03, 2018
by
AJ Fite
🛫
Browse files
First shot at implementing licor reader
parent
7e53e7f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
SimfPythonGUI/filehandlers.py
View file @
044b7317
...
...
@@ -57,8 +57,9 @@ class LicorThread(QThread):
self
.
event_thread
=
event_thread
def
on_created
(
self
,
event
):
# TODO: Read licor file, convert to float, send to event
self
.
event_thread
.
new_licor
.
emit
(
event
.
src_path
)
file
=
open
(
event
.
src_path
,
"r"
)
output
=
float
(
file
.
read
())
self
.
event_thread
.
new_licor
.
emit
(
output
)
def
run
(
self
):
datadir
=
FileHandlerUtils
.
compute_current_data_dir
()
...
...
SimfPythonGUI/main.py
View file @
044b7317
...
...
@@ -6,7 +6,7 @@ import pkg_resources
from
PyQt5.QtCore
import
QProcess
,
QProcessEnvironment
,
Qt
from
PyQt5.QtGui
import
QPixmap
from
PyQt5.QtWidgets
import
QMainWindow
,
QApplication
,
QGraphicsScene
from
.filehandlers
import
ImageThread
from
.filehandlers
import
ImageThread
,
LicorThread
from
.sudo
import
PasswordWindow
from
.about
import
AboutDialog
from
.config
import
Config
,
ConfigEditor
...
...
@@ -28,6 +28,9 @@ class MainWindow(QMainWindow):
self
.
png_watcher
=
ImageThread
()
self
.
png_watcher
.
new_image
.
connect
(
self
.
update_image
)
self
.
licor_watcher
=
LicorThread
()
self
.
licor_watcher
.
new_licor
.
connect
(
self
.
update_licor
)
# Register Events
self
.
startCapButton
.
clicked
.
connect
(
self
.
start_capture
)
self
.
stopCapButton
.
clicked
.
connect
(
self
.
stop_capture
)
...
...
@@ -102,6 +105,9 @@ class MainWindow(QMainWindow):
# TODO: Capture progress
self
.
current
=
(
self
.
current
+
1
)
%
Config
.
dbg_lepton_set
def
update_licor
(
self
,
licor
):
self
.
solarIrradiance
.
display
(
licor
)
# Opens a link
@
staticmethod
def
open_link
(
link
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment