-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
Having difficulties testing this with the simulator. Here's the traceback from my most recent attempt, which failed as I tried to connect the GCS to the sim:
Curious if you're seeing this too? I can troubleshoot on my end if it might be an issue with versions or something else local to my machine. I don't see why an Enum shouldn't be allowed as a key since it's immutable... |
Fixed in 8eb8907 All options are now of type |
RctGcs/ui/popups.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ConfigDialog and ConfigDialogPage still use connection_port
and connection_addr
def add_target(self): | ||
''' | ||
Internal function to facilitate users adding target frequencies | ||
''' | ||
try: | ||
cntr_freq = int(self.option_vars['SDR_center_freq'].text()) | ||
samp_freq = int(self.option_vars['SDR_sampling_freq'].text()) | ||
sdr_gain = float(self.option_vars['SDR_gain'].text()) | ||
cntr_freq = int(self.option_vars[Options.SDR_CENTER_FREQ].text()) | ||
samp_freq = int(self.option_vars[Options.SDR_SAMPLING_FREQ].text()) | ||
sdr_gain = float(self.option_vars[Options.SDR_GAIN].text()) | ||
except ValueError: | ||
UserPopups.show_warning("Please enter center and sampling frequences and SDR gain settings.") | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused method
def validate_frequency(self, value: int) -> bool: | ||
''' | ||
Helper function to ensure frequencies are within an appropriate | ||
range | ||
Args: | ||
var: An integer value that is the frequency to be validated | ||
''' | ||
cntr_freq = self.__root._mav_model.getOption('SDR_center_freq') | ||
samp_freq = self.__root._mav_model.getOption('SDR_sampling_freq') | ||
if abs(var - cntr_freq) > samp_freq: | ||
try: | ||
model = MAVModel.get_model() | ||
except NoActiveModel: | ||
return | ||
cntr_freq = model.getOption(Options.SDR_CENTER_FREQ) | ||
samp_freq = model.getOption(Options.SDR_SAMPLING_FREQ) | ||
if abs(value - cntr_freq) > samp_freq: | ||
return False | ||
return True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused method--should these checks be performed upon ?add_entry
(in widgets.py
)
Edit: __update_button_callback
in controls.py
would be a more appropriate place. Not sure what I was thinking with add_entry
...
Working drone-based GCS support