From 8debd43fc4ae153c074466f0b599503bc937b8f8 Mon Sep 17 00:00:00 2001 From: Dmitry Moiseev Date: Wed, 20 Nov 2013 15:40:13 +0600 Subject: Added support for Lou Reed special mode and Parrot Concert Hall Mode --- ParrotZik.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 -- cgit v1.2.1