изменил обработку каналов

Ufa
Sergey Revyakin 1 week ago
parent 7845d908ac
commit d1eecb9d7d

@ -7,12 +7,12 @@ import json
import time
load_root_env(__file__)
validate_env("orange_scripts/compose_send_data_1200.py", {
"POROG_1200": as_float,
"SERVER_IP_2": as_str,
"SERVER_PORT_2": as_int,
})
load_root_env(__file__)
validate_env("orange_scripts/compose_send_data_1200.py", {
"POROG_1200": as_float,
"SERVER_IP_2": as_str,
"SERVER_PORT_2": as_int,
})
porog = float(os.getenv('POROG_1200'))
server_ip_1 = os.getenv('SERVER_IP_1')
server_port_1 = os.getenv('SERVER_PORT_1')
@ -21,7 +21,6 @@ server_port_2 = os.getenv('SERVER_PORT_2')
PARAMS = {'split_size': 400_000, 'point_amount': 100_000}
PARAMS['show_amount'] = 0.8 * PARAMS['point_amount']
token = 0
channel = 1
flag = 0
##############################
@ -30,6 +29,7 @@ flag = 0
f_base = 1.1e9
f_step = 20e6
f_roof = 1.3e9
channel = f_base
##############################
# Variables
##############################
@ -96,7 +96,7 @@ def work(lvl):
if f >= f_roof:
f = f_base
signal_arr = []
channel = 1
channel = f
return f, EOCF
else:
if flag == 0 and len(signal_arr) >= PARAMS['point_amount']:
@ -104,11 +104,11 @@ def work(lvl):
signal_arr = []
if flag == 0:
f += f_step
channel += 1
channel = f
if len(signal_arr) >= PARAMS['split_size']:
send_data(signal_arr[:PARAMS['split_size']])
flag = 0
signal_arr = []
channel += 1
f += f_step
channel = f
return f, EOCF

@ -22,7 +22,6 @@ server_port_2 = os.getenv('SERVER_PORT_2')
PARAMS = {'split_size': 400_000, 'point_amount': 100_000}
PARAMS['show_amount'] = 0.8 * PARAMS['point_amount']
token = 0
channel = 1
flag = 0
##############################
@ -31,6 +30,7 @@ flag = 0
f_base = 2.4e9
f_step = 20e6
f_roof = 2.5e9
channel = f_base
##############################
# Variables
##############################
@ -97,7 +97,7 @@ def work(lvl):
if f >= f_roof:
f = f_base
signal_arr = []
channel = 1
channel = f
return f, EOCF
else:
if flag == 0 and len(signal_arr) >= PARAMS['point_amount']:
@ -105,11 +105,11 @@ def work(lvl):
signal_arr = []
if flag == 0:
f += f_step
channel += 1
channel = f
if len(signal_arr) >= PARAMS['split_size']:
send_data(signal_arr[:PARAMS['split_size']])
flag = 0
signal_arr = []
channel += 1
channel = f
f += f_step
return f, EOCF

@ -22,7 +22,6 @@ server_port_2 = os.getenv('SERVER_PORT_2')
PARAMS = {'split_size': 400_000, 'point_amount': 100_000}
PARAMS['show_amount'] = 0.8 * PARAMS['point_amount']
token = 0
channel = 1
flag = 0
##############################
@ -31,6 +30,7 @@ flag = 0
f_base = 5.9e9
f_step = 20e6
f_roof = 5.7e9
channel = f_base
##############################
# Variables
##############################
@ -97,7 +97,7 @@ def work(lvl):
if f >= f_roof:
f = f_base
signal_arr = []
channel = 1
channel = f
return f, EOCF
else:
if flag == 0 and len(signal_arr) >= PARAMS['point_amount']:
@ -105,11 +105,11 @@ def work(lvl):
signal_arr = []
if flag == 0:
f += f_step
channel += 1
channel = f
if len(signal_arr) >= PARAMS['split_size']:
send_data(signal_arr[:PARAMS['split_size']])
flag = 0
signal_arr = []
channel += 1
channel = f
f += f_step
return f, EOCF

@ -21,12 +21,12 @@ server_port_2 = os.getenv('SERVER_PORT_2')
PARAMS = {'split_size': 400_000, 'point_amount': 100_000}
PARAMS['show_amount'] = int(0.8 * PARAMS['point_amount'])
token = 0
channel = 1
flag = 0
f_base = 0.91e9
f_step = 20e6
f_roof = 0.98e9
channel = f_base
f = f_base
EOCF = 0
@ -85,11 +85,11 @@ def advance_freq():
next_freq = f + f_step
if next_freq >= f_roof:
f = f_base
channel = 1
channel = f
return f, True
f = next_freq
channel += 1
channel = f
return f, False

Loading…
Cancel
Save