mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
PTT_STATE
This commit is contained in:
parent
60bea070ec
commit
7f1a502a81
8
modem.py
8
modem.py
|
@ -64,6 +64,7 @@ class RF():
|
|||
def transmit_arq_ack(self,ack_buffer):
|
||||
#print(ack_buffer)
|
||||
static.ARQ_STATE = 'SENDING_ACK'
|
||||
static.PTT_STATE = True
|
||||
|
||||
self.c_lib.freedv_open.restype = ctypes.POINTER(ctypes.c_ubyte)
|
||||
freedv = self.c_lib.freedv_open(static.FREEDV_SIGNALLING_MODE)
|
||||
|
@ -99,11 +100,12 @@ class RF():
|
|||
self.stream_tx.write(bytes(txbuffer))
|
||||
self.stream_tx.write(bytes(txbuffer))
|
||||
|
||||
static.PTT_STATE = False
|
||||
static.ARQ_STATE = 'RECEIVING_DATA'
|
||||
#--------------------------------------------------------------------------------------------------------
|
||||
# GET ARQ BURST FRAME VOM BUFFER AND MODULATE IT
|
||||
def transmit_arq_burst(self):
|
||||
|
||||
static.PTT_STATE = True
|
||||
static.ARQ_STATE = 'SENDING_DATA'
|
||||
|
||||
self.c_lib.freedv_open.restype = ctypes.POINTER(ctypes.c_ubyte)
|
||||
|
@ -160,7 +162,7 @@ class RF():
|
|||
self.c_lib.freedv_rawdatatx(freedv,mod_out,data) # modulate DATA and safe it into mod_out pointer
|
||||
txbuffer += bytes(mod_out)
|
||||
txbuffer = txbuffer.rstrip(b'\x00') #lets remove unallocated memory because of wrong buffer :-/
|
||||
|
||||
|
||||
elif static.ARQ_RPT_RECEIVED == True:
|
||||
|
||||
for n in range(0,len(static.ARQ_RPT_FRAMES)):
|
||||
|
@ -207,7 +209,7 @@ class RF():
|
|||
#time.sleep(0.5)
|
||||
static.ARQ_STATE = 'IDLE'
|
||||
#static.ARQ_STATE = 'RECEIVING_SIGNALLING'
|
||||
|
||||
static.PTT_STATE = False
|
||||
#--------------------------------------------------------------------------------------------------------
|
||||
def receive(self,data_mode,signalling_mode):
|
||||
force = False
|
||||
|
|
9
sock.py
9
sock.py
|
@ -60,7 +60,16 @@ class CMDTCPRequestHandler(socketserver.BaseRequestHandler):
|
|||
|
||||
if data == 'GET:DXCALLSIGN':
|
||||
self.request.sendall(bytes(static.DXCALLSIGN, encoding))
|
||||
|
||||
if data == 'GET:TNC_STATE':
|
||||
self.request.sendall(static.TNC_STATE)
|
||||
|
||||
if data == 'GET:PTT_STATE':
|
||||
self.request.sendall(bytes(str(static.PTT_STATE), encoding))
|
||||
|
||||
|
||||
|
||||
|
||||
# ARQ
|
||||
if data == 'GET:ARQ_STATE':
|
||||
self.request.sendall(bytes(static.ARQ_STATE, encoding))
|
||||
|
|
Loading…
Reference in a new issue