diff options
author | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-13 01:06:39 +0200 |
---|---|---|
committer | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-13 01:07:36 +0200 |
commit | b890260fb76f5685711e8f6b580f476f03f5e126 (patch) | |
tree | 239fe7eec4f6c8016be79a7563a7eb615885c534 | |
parent | 7856465e1ab0ab69101996b12e93450c6bea160b (diff) | |
download | pyParrotZikTCP-b890260fb76f5685711e8f6b580f476f03f5e126.tar.xz pyParrotZikTCP-b890260fb76f5685711e8f6b580f476f03f5e126.zip |
Complete zik 2 api.
-rw-r--r-- | ParrotZik.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ParrotZik.py b/ParrotZik.py index 7cb623d..af20b52 100644 --- a/ParrotZik.py +++ b/ParrotZik.py @@ -204,3 +204,45 @@ class ParrotZikVersion2(ParrotZikBase): @flight_mode.setter def flight_mode(self, arg): self.api.set('/api/flight_mode/enable', arg) + + @property + def room_size(self): + data = self.api.get('/api/audio/sound_effect/room_size/get') + return data.answer.audio.sound_effect['room_size'] + + @room_size.setter + def room_size(self, arg): + self.api.set('/api/audio/sound_effect/room_size/set', arg) + + @property + def external_noise(self): + data = self.api.get('/api/audio/noise/get') + return int(data.answer.audio.noise['external']) + + @property + def internal_noise(self): + data = self.api.get('/api/audio/noise/get') + return int(data.answer.audio.noise['internal']) + + @property + def angle(self): + data = self.api.get('/api/audio/sound_effect/angle/get') + return int(data.answer.audio.sound_effect['angle']) + + @angle.setter + def angle(self, arg): + self.api.set('/api/audio/sound_effect/angle/set', arg) + + @property + def noise_control(self): + data = self.api.get('/api/audio/noise_control/get') + return self._result_to_bool(data.answer.audio.noise_control['value']) + + @noise_control.setter + def noise_control(self, arg): + self.api.set('/api/audio/noise_control/set', arg) + + @property + def noise_control_enabled(self): + data = self.api.get('/api/audio/noise_control/enabled/get') + return self._result_to_bool(data.answer.audio.noise_control['enabled']) |