mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
improved transmission rate
This commit is contained in:
parent
5997a00c0c
commit
03420b2c72
1 changed files with 8 additions and 4 deletions
|
@ -131,11 +131,15 @@ def arq_reset_frame_machine():
|
|||
|
||||
def calculate_transfer_rate():
|
||||
|
||||
#arq_tx_n_total_arq_frames = int.from_bytes(static.ARQ_TX_N_TOTAL_ARQ_FRAMES, "big")
|
||||
|
||||
print(static.ARQ_TX_N_TOTAL_ARQ_FRAMES)
|
||||
print(static.ARQ_N_ARQ_FRAMES_PER_DATA_FRAME)
|
||||
print(static.ARQ_RX_N_CURRENT_ARQ_FRAME)
|
||||
|
||||
|
||||
arq_tx_n_total_arq_frames = static.ARQ_TX_N_TOTAL_ARQ_FRAMES
|
||||
arq_n_arq_frames_per_data_frame = static.ARQ_N_ARQ_FRAMES_PER_DATA_FRAME
|
||||
arq_rx_n_current_arq_frame = static.ARQ_N_ARQ_FRAMES_PER_DATA_FRAME
|
||||
|
||||
arq_rx_n_current_arq_frame = static.ARQ_RX_N_CURRENT_ARQ_FRAME
|
||||
|
||||
if arq_tx_n_total_arq_frames == 0:
|
||||
total_n_frames = arq_n_arq_frames_per_data_frame
|
||||
|
@ -163,7 +167,7 @@ def calculate_transfer_rate():
|
|||
|
||||
if arq_tx_n_total_arq_frames > 0:
|
||||
|
||||
static.ARQ_TRANSMISSION_PERCENT = int(int.from_bytes(bytes(arq_rx_n_current_arq_frame), "big") / arq_tx_n_total_arq_frames) * 100
|
||||
static.ARQ_TRANSMISSION_PERCENT = int(arq_rx_n_current_arq_frame / arq_tx_n_total_arq_frames) * 100
|
||||
|
||||
elif arq_n_arq_frames_per_data_frame > 0:
|
||||
static.ARQ_TRANSMISSION_PERCENT = int(arq_rx_n_current_arq_frame / arq_n_arq_frames_per_data_frame) * 100
|
||||
|
|
Loading…
Reference in a new issue