Skip to content

Commit

Permalink
bitcraze#359 Reverted everything in PR#359 except code related to usi…
Browse files Browse the repository at this point in the history
…ng params instead of OW memory
  • Loading branch information
krichardsson committed Aug 26, 2019
1 parent 4af02bb commit 7987c1d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 35 deletions.
1 change: 0 additions & 1 deletion src/cfclient/configs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"max_rp": 30,
"client_side_xmode": false,
"auto_reconnect": false,
"keep_alive": false,
"device_config_mapping": {},
"enable_debug_driver": false,
"input_device_blacklist": "(VirtualBox|VMware)",
Expand Down
18 changes: 0 additions & 18 deletions src/cfclient/ui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,6 @@ def __init__(self, *args):
self._auto_reconnect_changed)
self.autoReconnectCheckBox.setChecked(Config().get("auto_reconnect"))

self._keep_alive_enabled = Config().get("keep_alive")
self.keepAliveCheckBox.toggled.connect(
self._keep_alive_changed)
self.keepAliveCheckBox.setChecked(Config().get("keep_alive"))

self._disable_input = False

self.joystickReader.input_updated.add_callback(
Expand Down Expand Up @@ -556,19 +551,6 @@ def _auto_reconnect_changed(self, checked):
Config().set("auto_reconnect", checked)
logger.info("Auto reconnect enabled: {}".format(checked))

def _keep_alive_changed(self, checked):
self._keep_alive_enabled = checked
Config().set("keep_alive", checked)
logger.info("Keep alive enabled: {}".format(checked))

if checked:
cflib.crtp.radiodriver.set_retries_before_disconnect(99999999999999999) # never disconnect :)
cflib.crtp.radiodriver.set_retries(3)
else:
cflib.crtp.radiodriver.set_retries_before_disconnect(1500) # default
cflib.crtp.radiodriver.set_retries(3)


def _show_connect_dialog(self):
self.logConfigDialogue.show()

Expand Down
15 changes: 1 addition & 14 deletions src/cfclient/ui/main.ui
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<layout class="QHBoxLayout" stretch="0,0,0,1">
<layout class="QHBoxLayout" stretch="0,0,1">
<item>
<widget class="QLabel" name="addressLabel">
<property name="text">
Expand Down Expand Up @@ -220,19 +220,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="keepAliveCheckBox">
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="text">
<string>Keep Alive</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down
3 changes: 1 addition & 2 deletions src/cfclient/ui/tabs/FlightTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,7 @@ def _ring_populate_dropdown(self):
12: "Gravity",
13: "LED tab",
14: "Color fader",
15: "Link quality",
16: "Lighthouse quality"}
15: "Link quality"}

for i in range(nbr + 1):
name = "{}: ".format(i)
Expand Down

0 comments on commit 7987c1d

Please sign in to comment.