Skip to content

Commit

Permalink
fix some compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lesire committed Apr 24, 2014
1 parent 2418edc commit 1037ca1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
12 changes: 5 additions & 7 deletions src/autopilot/ControlNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
#include <string>

// include KI's
#include "KI/KIAutoInit.h";
#include "KI/KIFlyTo.h";
#include "KI/KILand.h";
#include "KI/KIAutoInit.h"
#include "KI/KIFlyTo.h"
#include "KI/KILand.h"
#include "KI/KIProcedure.h"


Expand Down Expand Up @@ -155,12 +155,10 @@ void ControlNode::popNextCommand(const tum_ardrone::filter_stateConstPtr statePt
ROS_INFO("executing command: %s",command.c_str());


int p;
unsigned int p;
char buf[100];
float parameters[10];

int pi;

// replace macros
if((p = command.find("$POSE$")) != std::string::npos)
{
Expand Down Expand Up @@ -426,7 +424,7 @@ void ControlNode::sendControlToDrone(ControlCommand cmd)
cmdT.linear.y = -cmd.roll;

// assume that while actively controlling, the above for will never be equal to zero, so i will never hover.
cmdT.angular.x = cmdT.angular.x = 0;
cmdT.angular.x = cmdT.angular.y = 0;

if(isControlling)
{
Expand Down
2 changes: 1 addition & 1 deletion src/autopilot/DroneController.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct DronePosition
double yaw;
TooN::Vector<3> pos;
inline DronePosition(TooN::Vector<3> pos, double yaw)
: pos(pos), yaw(yaw) {}
: yaw(yaw), pos(pos) {}
inline DronePosition(){ yaw=0; pos=TooN::makeVector(0,0,0);}
};

Expand Down
4 changes: 4 additions & 0 deletions src/autopilot/KI/KIAutoInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ bool KIAutoInit::update(const tum_ardrone::filter_stateConstPtr statePtr)
case DONE:
node->sendControlToDrone(controller->update(statePtr));
return true;
default:
return false;
}
return true; // should never happen....
}
Expand Down Expand Up @@ -180,6 +182,8 @@ bool KIAutoInit::update(const tum_ardrone::filter_stateConstPtr statePtr)
case DONE:
node->sendControlToDrone(controller->update(statePtr));
return true;
default:
return false;
}
return false; // again: should never happen....
}
Expand Down
2 changes: 1 addition & 1 deletion src/autopilot/KI/KIProcedure.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class KIProcedure

// constructed shortly before first update.
inline KIProcedure(void) {node = NULL; controller = NULL; command = "not set"; };
inline ~KIProcedure(void) {};
virtual ~KIProcedure(void) {};
};

#endif /* __KIPROCEDURE_H */
Expand Down

0 comments on commit 1037ca1

Please sign in to comment.