Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
osie
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
osie
Commits
7d89645a
Commit
7d89645a
authored
Jun 21, 2024
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update only if it makes sense.
parent
f23927cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
oi-sensor/oi-sensor.py
oi-sensor/oi-sensor.py
+9
-7
No files found.
oi-sensor/oi-sensor.py
View file @
7d89645a
...
...
@@ -161,6 +161,7 @@ async def main():
print
(
"
\
t
Detected area (px)=%.2f, result=%d, shape changes=%d"
%
(
area
,
result
,
shape_change_counter
))
# update list for last X results (FILO)
if
current_shape
!=
result
:
result_stack
.
append
(
result
)
current_shape
=
result
shape_change_counter
+=
1
...
...
@@ -173,6 +174,7 @@ async def main():
if
not
contour_detected
:
# no countours actually detected thus update OPC UA server's node attribute
result
=
0.0
if
current_shape
!=
result
:
result_stack
.
append
(
result
)
shape_change_counter
+=
1
await
myvar
.
write_value
(
result
)
...
...
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