| 333 | } |
| 334 | |
| 335 | void JoystickStep() { |
| 336 | { |
| 337 | std::lock_guard<std::mutex> lock(joystick_mutex); |
| 338 | gamepad.Update(joystick_msg); |
| 339 | } |
| 340 | |
| 341 | rc_command.left_stick[0] = gamepad.lx; |
| 342 | rc_command.left_stick[1] = gamepad.ly; // +up is 1, +right is 0 |
| 343 | rc_command.right_stick[0] = gamepad.rx; |
| 344 | rc_command.right_stick[1] = gamepad.ry; |
| 345 | rc_command.right_lower_right_switch = gamepad.R2.pressed; |
| 346 | |
| 347 | _simpleLCM.publish("rc_command", &rc_command); |
| 348 | } |
| 349 | |
| 350 | void Control() { |
| 351 | // set rpy of observation; for projected gravity later |
nothing calls this directly
no outgoing calls
no test coverage detected