Add format script which invokes clang-format on the C++ source code (#41)

On Windows machines, clang-format.exe must be in the PATH environment variable.
This commit is contained in:
Tyler Veness
2016-05-20 17:30:37 -07:00
committed by Peter Johnson
parent 68690643d2
commit e14e45da76
383 changed files with 13787 additions and 13198 deletions

View File

@@ -31,36 +31,36 @@ using namespace gazebo;
* - `link`: Name of the link the servo is attached to.
* - `topic`: Optional. Message type should be gazebo.msgs.Float64.
*/
class Servo: public ModelPlugin {
public:
Servo();
~Servo();
class Servo : public ModelPlugin {
public:
Servo();
~Servo();
/// \brief load the servo and configure it according to the sdf
void Load(physics::ModelPtr model, sdf::ElementPtr sdf);
/// \brief load the servo and configure it according to the sdf
void Load(physics::ModelPtr model, sdf::ElementPtr sdf);
/// \brief Update the torque on the joint from the dc motor each timestep.
void Update(const common::UpdateInfo &info);
/// \brief Update the torque on the joint from the dc motor each timestep.
void Update(const common::UpdateInfo& info);
private:
/// \brief Topic to read control signal from.
std::string topic;
private:
/// \brief Topic to read control signal from.
std::string topic;
/// \brief the pwm signal limited to the range [-1,1]
double signal;
/// \brief the pwm signal limited to the range [-1,1]
double signal;
/// \brief the torque of the motor in kg/cm
double torque;
/// \brief the torque of the motor in kg/cm
double torque;
/// \brief the joint that this servo moves
physics::JointPtr joint;
/// \brief the joint that this servo moves
physics::JointPtr joint;
/// \brief Callback for receiving msgs and storing the signal
void Callback(const msgs::ConstFloat64Ptr &msg);
physics::ModelPtr model; ///< \brief The model that this is attached to
event::ConnectionPtr updateConn; ///< \brief The Pointer to the world update function
transport::NodePtr node; ///< \brief The node we're advertising torque on
transport::SubscriberPtr sub; ///< \brief the Subscriber for the pwm signal
/// \brief Callback for receiving msgs and storing the signal
void Callback(const msgs::ConstFloat64Ptr& msg);
physics::ModelPtr model; ///< \brief The model that this is attached to
event::ConnectionPtr
updateConn; ///< \brief The Pointer to the world update function
transport::NodePtr node; ///< \brief The node we're advertising torque on
transport::SubscriberPtr sub; ///< \brief the Subscriber for the pwm signal
};