4 #include <MessageCarrier.pb.h>
5 #include <boost/log/trivial.hpp>
17 using namespace goliath::proto;
67 goliath::proto::MessageCarrier inputToCommand(goliath::proto::CommandMessage::CommandCase command,
int value = 0);
84 goliath::proto::MessageCarrier
toMoveWingMessage(goliath::proto::commands::ServoCommand_Motor wing, goliath::proto::commands::ServoCommand_Direction direction,
int speed);
93 goliath::proto::MessageCarrier
toMoveWingMessage(std::vector<commands::ServoCommand_Motor> wings, commands::ServoCommand_Direction direction,
int speed);
goliath::proto::MessageCarrier buttonToFrontWing(CONTROL control, int value)
Converts button presses to message with MoveWingCommand for front wings.
Definition: convert.cpp:58
goliath::proto::MessageCarrier buttonToAllWing(CONTROL control, int value)
Converts button presses to message with MoveWingCommand for front/back wings.
Definition: convert.cpp:122
TYPE stringToType(std::string string)
Converts type string from controller to TYPE enum.
Definition: convert.cpp:265
TYPE
enum for all input types
Definition: convert.h:23
goliath::proto::MessageCarrier buttonToBackWing(CONTROL control, int value)
Converts button presses to message with MoveWingCommand for back wings.
Definition: convert.cpp:90
CONTROL
enum for all axes and buttons
Definition: control.h:14
goliath::proto::MessageCarrier toMoveWingMessage(goliath::proto::commands::ServoCommand_Motor wing, goliath::proto::commands::ServoCommand_Direction direction, int speed)
Converts input to Message with MoveWingCommand.
goliath::proto::MessageCarrier dualJoystickToMove(CONTROL control, int value)
Converts joystick movement into Message with a MoveCommand.
Definition: convert.cpp:13
goliath::proto::CommandMessage::CommandCase stringToCommandCase(std::string string)
Converts command string from controller to CommandCase.
Definition: convert.cpp:269
goliath::proto::MessageCarrier convertControl(CONTROL control, int value, std::map< CONTROL, std::function< goliath::proto::MessageCarrier(CONTROL, int)>> function)
Calls function mapped to the input.