This website works better with JavaScript.
Home
Explore
Help
Sign In
yasarba71520
/
Line-Following-Robot
Watch
2
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Allow neg. angle
master
Tim Zeuner
1 year ago
parent
6692a2fcda
commit
7814f64873
1 changed files
with
4 additions
and
0 deletions
Split View
Show Diff Stats
4
0
AutonomousMode/Processing/processing.cpp
+ 4
- 0
AutonomousMode/Processing/processing.cpp
View File
@@ -144,6 +144,10 @@ void Processing::calcAngles(FrameData &data, int imageColums, int imageRows, boo
LFRVector b(contourCenter-focusPoint);
double angle = a.angle(b);
if (b.x < 0.0)
{
angle *= -1.0;
}
//Write to Data
data.angle = angle;
Write
Preview
Loading…
Cancel
Save