Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
df-aggregator
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oleksandr Barabash
df-aggregator
Commits
c9227ee8
Commit
c9227ee8
authored
Apr 02, 2023
by
Oleksandr Barabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes
parent
b155108e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
df-aggregator.py
df-aggregator.py
+14
-7
No files found.
df-aggregator.py
View file @
c9227ee8
...
@@ -1041,15 +1041,22 @@ def run_receiver(receivers):
...
@@ -1041,15 +1041,22 @@ def run_receiver(receivers):
for
rx
in
receivers
:
for
rx
in
receivers
:
try
:
try
:
if
rx
.
isActive
:
if
rx
.
isActive
:
# This is very bad part of the code
# We have to change this to the queue for each receiver.
rx
.
update
()
rx
.
update
()
except
IOError
:
except
IOError
:
print
(
"Problem connecting to receiver."
)
print
(
"Problem connecting to receiver."
)
rx
.
d_2_last_intersection
=
[]
rx
.
d_2_last_intersection
=
[]
time
.
sleep
(
0.1
)
time
.
sleep
(
0.1
)
for
x
in
range
(
len
(
receivers
)):
for
y
in
range
(
x
):
# for x in range(len(receivers)):
if
x
!=
y
:
# for y in range(x):
# if x != y:
receivers_len
=
len
(
receivers
)
for
x
in
range
(
receivers_len
):
y_receiver_id
=
x
+
1
for
y
in
range
(
y_receiver_id
,
receivers_len
):
if
(
receivers
[
x
]
.
confidence
>=
ms
.
min_conf
and
if
(
receivers
[
x
]
.
confidence
>=
ms
.
min_conf
and
receivers
[
y
]
.
confidence
>=
ms
.
min_conf
and
receivers
[
y
]
.
confidence
>=
ms
.
min_conf
and
receivers
[
x
]
.
power
>=
ms
.
min_power
and
receivers
[
x
]
.
power
>=
ms
.
min_power
and
...
@@ -1076,12 +1083,12 @@ def run_receiver(receivers):
...
@@ -1076,12 +1083,12 @@ def run_receiver(receivers):
# or not. But if it is, you better fucking sleep
# or not. But if it is, you better fucking sleep
# 10ms after each cycle to prevent 100% load
# 10ms after each cycle to prevent 100% load
# of the CPU.
# of the CPU.
time
.
sleep
(
0.1
)
time
.
sleep
(
0.
00
1
)
# 11.01.2023::s1z: I don't know if this shit-code is blocking
# 11.01.2023::s1z: I don't know if this shit-code is blocking
# or not. But if it is, you better fucking sleep
# or not. But if it is, you better fucking sleep
# 10ms after each cycle to prevent 100% load
# 10ms after each cycle to prevent 100% load
# of the CPU.
# of the CPU.
time
.
sleep
(
0.1
)
time
.
sleep
(
0.
00
1
)
if
intersect_list
.
size
!=
0
:
if
intersect_list
.
size
!=
0
:
avg_coord
=
np
.
average
(
avg_coord
=
np
.
average
(
...
@@ -1151,7 +1158,7 @@ def run_receiver(receivers):
...
@@ -1151,7 +1158,7 @@ def run_receiver(receivers):
# or not. But if it is, you better fucking sleep
# or not. But if it is, you better fucking sleep
# 10ms after each cycle to prevent 100% load
# 10ms after each cycle to prevent 100% load
# of the CPU.
# of the CPU.
time
.
sleep
(
0.01
)
# 11.01.2023::s1z: The fuck is this crap ?
time
.
sleep
(
0.0
0
1
)
# 11.01.2023::s1z: The fuck is this crap ?
DATABASE_EDIT_Q
.
put
((
"done"
,
None
,
False
))
DATABASE_EDIT_Q
.
put
((
"done"
,
None
,
False
))
# try:
# try:
...
@@ -1160,7 +1167,7 @@ def run_receiver(receivers):
...
@@ -1160,7 +1167,7 @@ def run_receiver(receivers):
# print("Problem connecting to receiver.")
# print("Problem connecting to receiver.")
ms
.
rx_busy
=
False
ms
.
rx_busy
=
False
time
.
sleep
(
1
)
time
.
sleep
(
0.00
1
)
if
dots
>
5
:
if
dots
>
5
:
dots
=
1
dots
=
1
else
:
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment