Adding a pause between message pairs. Currently set to make one pair a second

This commit is contained in:
nzkarit
2018-05-23 22:53:38 +12:00
parent 6a9cf210bb
commit 46a3ca9dd2
4 changed files with 85 additions and 69 deletions
+13
View File
@@ -46,3 +46,16 @@ class PPM:
#print '[{}]'.format(', '.join(hex(x) for x in ppm))
return bytearray(ppm)
def addGap(self, gap):
"""
This function will add dead air as a gap between messages
Args:
gap: The number of microseconds to have as a gap
Returns:
The bytearray of the PPM data
"""
ppm = [ ]
for i in range(gap): # pause
ppm.append( 0 )
return bytearray(ppm)