projects
/
bachelor-thesis
/
roomba_tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
47be921
)
turn: allow negative values for orientation input, but only positive for velocity
master
author
Roland Hieber
<rohieb@rohieb.name>
Thu, 20 Jan 2011 14:14:24 +0000
(15:14 +0100)
committer
Roland Hieber
<rohieb@rohieb.name>
Thu, 20 Jan 2011 15:30:16 +0000
(16:30 +0100)
main.cc
patch
|
blob
|
history
diff --git
a/main.cc
b/main.cc
index
e373c51
..
c02d17e
100644
(file)
--- a/
main.cc
+++ b/
main.cc
@@
-227,7
+227,7
@@
void turn(Roomba& roomba, ControlledMotion& ctrl_motion) {
while(true) {
// new turn velocity
velocity = getInt(0, "Input velocity", chargeText()
while(true) {
// new turn velocity
velocity = getInt(0, "Input velocity", chargeText()
- + "Input turn velocity in mm/sec:", velocity,
-50
0, 500, 10, &ok);
+ + "Input turn velocity in mm/sec:", velocity, 0, 500, 10, &ok);
if(!ok) {
break;
}
if(!ok) {
break;
}
@@
-246,9
+246,10
@@
void turn(Roomba& roomba, ControlledMotion& ctrl_motion) {
// new current angle
measured_angle = getInt(0, "Input measured angle", chargeText() + QString(
// new current angle
measured_angle = getInt(0, "Input measured angle", chargeText() + QString(
- "Orientation should be %1 degree now.\n\n").arg((cur_angle + turn_angle)
- % 360) + "Input measured angle in degree the Roomba has "
- "turned:", turn_angle, 0, numeric_limits<int>::max(), 1, &ok);
+ "Orientation should be %1 degree now.\n\n").arg((cur_angle + turn_angle
+ + 360) % 360) + "Input measured angle in degree the Roomba has turned:",
+ turn_angle, numeric_limits<int>::min(), numeric_limits<int>::max(), 1,
+ &ok);
if(!ok) {
break;
}
if(!ok) {
break;
}
This page took
0.026146 seconds
and
4
git commands to generate.