diff options
author | Pavel Salomatov <pavel.salomatov@yotadevices.com> | 2016-02-05 15:41:47 +0300 |
---|---|---|
committer | Pavel Salomatov <pavel.salomatov@yotadevices.com> | 2016-02-05 15:41:47 +0300 |
commit | d6e3eb4ffb88959503cf41870dab72446ace6b46 (patch) | |
tree | 352c8c791b70c02275328edfecfbf53a1e552af2 /parrot_zik/interface | |
parent | 0f18e76062340a6beda2142ccaedccad09cd5193 (diff) | |
download | pyParrotZikTCP-d6e3eb4ffb88959503cf41870dab72446ace6b46.tar.xz pyParrotZikTCP-d6e3eb4ffb88959503cf41870dab72446ace6b46.zip |
Added functionality to change noise cancellation mode
"Head detection" now initializes on startup
Diffstat (limited to 'parrot_zik/interface')
-rw-r--r-- | parrot_zik/interface/version2.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/parrot_zik/interface/version2.py b/parrot_zik/interface/version2.py index b378a88..e6076ed 100644 --- a/parrot_zik/interface/version2.py +++ b/parrot_zik/interface/version2.py @@ -23,23 +23,23 @@ class ParrotZikVersion2Interface(ParrotZikBaseInterface): self.noise_control_cancelation_max = MenuItem( "Max Calcelation", functools.partial( self.toggle_noise_cancelation, - NoiseControlTypes.NOISE_CONTROL_MAX), checkitem=True, sensitive=False) + NoiseControlTypes.NOISE_CONTROL_MAX), checkitem=True) self.noise_control_cancelation_on = MenuItem( "Normal Cancelation", functools.partial( self.toggle_noise_cancelation, - NoiseControlTypes.NOISE_CONTROL_ON), checkitem=True, sensitive=False) + NoiseControlTypes.NOISE_CONTROL_ON), checkitem=True) self.noise_control_off = MenuItem( "Off", functools.partial( self.toggle_noise_cancelation, - NoiseControlTypes.NOISE_CONTROL_OFF), checkitem=True, sensitive=False) + NoiseControlTypes.NOISE_CONTROL_OFF), checkitem=True) self.noise_control_street_mode = MenuItem( "Street Mode", functools.partial( self.toggle_noise_cancelation, - NoiseControlTypes.STREET_MODE), checkitem=True, sensitive=False) + NoiseControlTypes.STREET_MODE), checkitem=True) self.noise_control_street_mode_max = MenuItem( "Street Mode Max", functools.partial( self.toggle_noise_cancelation, - NoiseControlTypes.STREET_MODE_MAX), checkitem=True, sensitive=False) + NoiseControlTypes.STREET_MODE_MAX), checkitem=True) self.noise_cancelation_submenu.append(self.noise_control_cancelation_max) self.noise_cancelation_submenu.append(self.noise_control_cancelation_on) self.noise_cancelation_submenu.append(self.noise_control_off) @@ -112,6 +112,8 @@ class ParrotZikVersion2Interface(ParrotZikBaseInterface): self.flight_mode.set_active(self.parrot.flight_mode) self._read_sound_effect_room() self._read_sound_effect_angle() + self.head_detection.set_active(self.parrot.head_detection) + sound_effect = self.parrot.sound_effect self.room_sound_effect_enabled.set_active(sound_effect) @@ -234,4 +236,4 @@ class ParrotZikVersion2Interface(ParrotZikBaseInterface): self.parrot.head_detection = self.head_detection.get_active() self.head_detection.set_active(self.parrot.head_detection) except resource_manager.DeviceDisconnected: - self.deactivate()
\ No newline at end of file + self.deactivate() |