improved transmission rate

This commit is contained in:
DJ2LS 2021-08-23 18:38:26 +02:00 committed by GitHub
parent 5997a00c0c
commit 03420b2c72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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