diff options
author | Dmitry Moiseev <m0sia@m0sia.ru> | 2013-11-20 15:40:13 +0600 |
---|---|---|
committer | Dmitry Moiseev <m0sia@m0sia.ru> | 2013-11-20 15:40:13 +0600 |
commit | 8debd43fc4ae153c074466f0b599503bc937b8f8 (patch) | |
tree | e59dbea473f0edbb9a4e8e6f5f7794e995623ec2 | |
parent | 2d940ea220d18131a74c11b62fa58b0d615c6532 (diff) | |
download | pyParrotZikTCP-8debd43fc4ae153c074466f0b599503bc937b8f8.tar.xz pyParrotZikTCP-8debd43fc4ae153c074466f0b599503bc937b8f8.zip |
Added support for Lou Reed special mode and Parrot Concert Hall Mode
Diffstat (limited to '')
-rw-r--r-- | ParrotZik.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ParrotZik.py b/ParrotZik.py index 0c654a5..830e317 100644 --- a/ParrotZik.py +++ b/ParrotZik.py @@ -84,6 +84,22 @@ class ParrotZik(object): data = self.sendSetMessage("/api/audio/noise_cancellation/enabled/set",arg) return data + def getLouReedMode(self): + data = self.sendGetMessage("/api/audio/specific_mode/enabled/get") + return data.answer.audio.specific_mode["enabled"] + + def setLouReedMode(self,arg): + data = self.sendSetMessage("/api/audio/specific_mode/enabled/set",arg) + return data + + def getParrotConcertHall(self): + data = self.sendGetMessage("/api/audio/sound_effect/enabled/get") + return data.answer.audio.sound_effect["enabled"] + + def setParrotConcertHall(self,arg): + data = self.sendSetMessage("/api/audio/sound_effect/enabled/set",arg) + return data + def sendGetMessage(self,message): message = ParrotProtocol.getRequest(message) return self.sendMessage(message) @@ -101,6 +117,7 @@ class ParrotZik(object): data = self.sock.recv(7) len = struct.unpack('B', data[1])[0] data = self.sock.recv(1024) + print data data=BeautifulSoup(data) return data |