Grow the graph for the tweak up/down buttons
We now have a ton of points between major nodes spaced such that we can
tweak up and down to adjust for the scale.
Change-Id: Id7db02b7be440bbb429995751a808c923f52ca98
diff --git a/y2018/joystick_reader.cc b/y2018/joystick_reader.cc
index fcdf51f..4e3103b 100644
--- a/y2018/joystick_reader.cc
+++ b/y2018/joystick_reader.cc
@@ -218,32 +218,23 @@
const bool near_goal =
superstructure_queue.status->arm.current_node == arm_goal_position_ &&
superstructure_queue.status->arm.path_distance_to_go < 1e-3;
- if (data.PosEdge(kArmStepDown) && near_goal) {
+ if (data.IsPressed(kArmStepDown) && near_goal) {
uint32_t *front_point = ::std::find(
front_points_.begin(), front_points_.end(), arm_goal_position_);
uint32_t *back_point = ::std::find(
back_points_.begin(), back_points_.end(), arm_goal_position_);
- LOG(INFO, "Step up\n");
if (front_point != front_points_.end()) {
- LOG(INFO, "In the front list, %d\n",
- static_cast<int>(
- ::std::distance(front_points_.begin(), front_point)));
++front_point;
if (front_point != front_points_.end()) {
- LOG(INFO, "Incrementing front\n");
arm_goal_position_ = *front_point;
}
} else if (back_point != back_points_.end()) {
- LOG(INFO, "In the back list, %d\n",
- static_cast<int>(
- ::std::distance(back_points_.begin(), back_point)));
++back_point;
if (back_point != back_points_.end()) {
- LOG(INFO, "Incrementing back\n");
arm_goal_position_ = *back_point;
}
}
- } else if (data.PosEdge(kArmStepUp) && near_goal) {
+ } else if (data.IsPressed(kArmStepUp) && near_goal) {
const uint32_t *front_point = ::std::find(
front_points_.begin(), front_points_.end(), arm_goal_position_);
const uint32_t *back_point = ::std::find(