Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
su
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dmeiss2s
su
Commits
457a3816
Commit
457a3816
authored
9 years ago
by
Daniel Meißner
Committed by
Daniel Meißner
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
gui: added logic to disable 1mhz sample rate in 868mhz mode
parent
0c7b3212
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/gui/gui.py
+17
-1
17 additions, 1 deletion
lib/gui/gui.py
with
17 additions
and
1 deletion
lib/gui/gui.py
+
17
−
1
View file @
457a3816
...
...
@@ -39,6 +39,8 @@ class SuGui(QtWidgets.QMainWindow):
self
.
button_close
.
clicked
.
connect
(
self
.
close_button
)
self
.
button_hw_refresh
.
clicked
.
connect
(
self
.
refresh_hw_button
)
self
.
comboBox_env
.
currentIndexChanged
.
connect
(
self
.
configure_env
)
self
.
rb_868
.
toggled
.
connect
(
self
.
_check_samp_rate
)
self
.
rb_1mhz
.
toggled
.
connect
(
self
.
_check_samp_rate
)
# menubar
self
.
actionQuit
.
triggered
.
connect
(
self
.
close_button
)
self
.
actionAbout
.
triggered
.
connect
(
self
.
about_button
)
...
...
@@ -69,6 +71,7 @@ class SuGui(QtWidgets.QMainWindow):
for
button
in
self
.
radio_buttons_samp_rate_and_time
.
keys
():
button
.
released
.
connect
(
self
.
_update_status_label
)
self
.
_check_samp_rate
()
# labels
self
.
_update_status_label
()
self
.
label_file_overwrite
.
setText
(
"
change path
"
)
...
...
@@ -121,6 +124,9 @@ class SuGui(QtWidgets.QMainWindow):
self
.
update_progress_bar
(
0
)
# enable buttons again
self
.
_set_setEnabled
(
True
)
# disbale freq buttons if env is selected
if
self
.
comboBox_env
.
currentIndex
()
!=
0
:
self
.
_set_setEnabled
(
False
,
freq_button_only
=
True
)
# disable stop button again
self
.
button_stop
.
setEnabled
(
False
)
self
.
button_start
.
setEnabled
(
True
)
...
...
@@ -190,6 +196,16 @@ class SuGui(QtWidgets.QMainWindow):
else
:
self
.
_set_setEnabled
(
True
)
def
_check_samp_rate
(
self
):
if
self
.
rb_868
.
isChecked
():
self
.
rb_1mhz
.
setEnabled
(
False
)
if
self
.
rb_1mhz
.
isChecked
():
self
.
rb_1mhz
.
setChecked
(
False
)
self
.
rb_2mhz
.
setChecked
(
True
)
else
:
self
.
rb_1mhz
.
setEnabled
(
True
)
def
_configure_enocean
(
self
):
self
.
rb_868
.
setChecked
(
True
)
self
.
rb_433
.
setChecked
(
False
)
...
...
@@ -332,7 +348,7 @@ class SuGui(QtWidgets.QMainWindow):
"""
Extract selected options from gui.
Buttons
Buttons
"""
freq_button
=
self
.
_get_checked_freq_button
()
time_and_samp_rate_buttons
=
self
.
_get_checked_time_and_samp_rate_radio_buttons
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment