Python should work now

This commit is contained in:
Sebastian 2016-12-23 02:08:57 +01:00
parent 1da83b8393
commit 26696599b3
2 changed files with 8 additions and 7 deletions

View File

@ -57,12 +57,12 @@ class _SSS7(object):
return tmp == 1
def has_received(self):
return _LIB_SSS7.libsss7_get_received()
return _LIB_SSS7.libsss7_has_received()
def get_received(self):
payload = [0] * LIBSSS7_PAYLOAD_SIZE
payload = _SSS7_PAYLOAD_TYPE()
_LIB_SSS7.libsss7_get_received(payload)
return payload
return [payload[i] for i in range(0, LIBSSS7_PAYLOAD_SIZE)]
def stop(self):
_LIB_SSS7.libsss7_stop()

View File

@ -25,10 +25,11 @@ def main():
print "Send failed"
#while(!bus.hasReceived());
#byte[] data = bus.getReceived();
#String str = new String(data);
#System.out.println(str);
while not SSS7.has_received():
sleep(0.1)
print to_string(SSS7.get_received())
SSS7.stop()