mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
WIP
This commit is contained in:
parent
e8a2a5d12a
commit
bfaa284837
2 changed files with 5 additions and 9 deletions
|
@ -4,7 +4,7 @@ import codec2
|
|||
|
||||
class DataFrameFactory:
|
||||
|
||||
def __init__(self, modem):
|
||||
def __init__(self):
|
||||
self.modem_config = modem.config
|
||||
self.modem_state = modem.state
|
||||
|
||||
|
@ -60,7 +60,7 @@ class DataFrameFactory:
|
|||
fec_wakeup_frame[8:9] = bytes([1]) # n payload bursts
|
||||
return fec_wakeup_frame
|
||||
|
||||
def build_fec(self):
|
||||
def build_fec(self, payload):
|
||||
fec_frame = bytearray(payload_per_frame)
|
||||
fec_frame[:1] = bytes([FR_TYPE.FEC.value])
|
||||
fec_frame[1:payload_per_frame] = bytes(payload[:fec_payload_length])
|
||||
|
|
|
@ -8,7 +8,7 @@ import helpers
|
|||
import structlog
|
||||
from modem_frametypes import FRAME_TYPE as FR_TYPE
|
||||
import event_manager
|
||||
from queues import DATA_QUEUE_RECEIVED, DATA_QUEUE_TRANSMIT
|
||||
from queues import DATA_QUEUE_RECEIVED, DATA_QUEUE_TRANSMIT, MODEM_TRANSMIT_QUEUE
|
||||
|
||||
from data_handler_broadcasts import BROADCAST
|
||||
from data_handler_data_broadcasts import DATABROADCAST
|
||||
|
@ -120,12 +120,8 @@ class DISPATCHER():
|
|||
"""Dispatch incoming UI instructions for transmitting operations"""
|
||||
while True:
|
||||
command = self.data_queue_transmit.get()
|
||||
self.log.debug(
|
||||
"[Modem] TX DISPATCHER - got a transmit command",
|
||||
command=command.getName(),
|
||||
)
|
||||
command.execute()
|
||||
|
||||
command.execute(MODEM_TRANSMIT_QUEUE)
|
||||
next
|
||||
|
||||
# Dispatch commands known to command_dispatcher
|
||||
if data[0] in self.command_dispatcher:
|
||||
|
|
Loading…
Reference in a new issue