add function test_voice

This commit is contained in:
Fanani M. Ihsan
2016-05-24 21:52:42 +07:00
parent 411b2679ef
commit 79b856f448
2 changed files with 11 additions and 0 deletions

View File

@@ -192,6 +192,16 @@ class ZK(object):
else:
return cmd_response
def test_voice(self):
command = const.CMD_TESTVOICE
cmd_response = self.__send_command(command)
cmd_response['data'] = ''
if cmd_response.get('status'):
cmd_response['message'] = 'voice detected'
return cmd_response
else:
return cmd_response
# def __get_size_user(self):
# """Checks a returned packet to see if it returned CMD_PREPARE_DATA,
# indicating that data packets are to be sent