add function test_voice
This commit is contained in:
10
zk/base.py
10
zk/base.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user