diff options
author | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2016-02-05 13:55:17 +0100 |
---|---|---|
committer | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2016-02-05 13:55:17 +0100 |
commit | 92e47683fc783a2dbd3d9737af40eb0b3372af61 (patch) | |
tree | a9cb773685d4e178db90a30b3926faaa85a7cd71 /parrot_zik/interface | |
parent | 19cafba037f55fa962e5819950cb1b1f7332180e (diff) | |
parent | d6e3eb4ffb88959503cf41870dab72446ace6b46 (diff) | |
download | pyParrotZikTCP-92e47683fc783a2dbd3d9737af40eb0b3372af61.tar.xz pyParrotZikTCP-92e47683fc783a2dbd3d9737af40eb0b3372af61.zip |
Merge pull request #7 from PsycheEYE/noisecontrol
Added functionality to change noise cancellation mode
Diffstat (limited to '')
-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() |