fixed CLI hardpoint_controller set

This commit is contained in:
blah
2016-03-14 09:07:46 +01:00
committed by Lorenz Meier
parent 8a1a9b43e0
commit c98e236744
2 changed files with 7 additions and 3 deletions
+5 -3
View File
@@ -1233,6 +1233,10 @@ static void print_usage()
extern "C" __EXPORT int uavcan_main(int argc, char *argv[]);
void UavcanNode::hardpoint_controller_set(uint8_t hardpoint_id, uint16_t command){
_hardpoint_controller.set_command(hardpoint_id, command);
}
int uavcan_main(int argc, char *argv[])
{
if (argc < 2) {
@@ -1382,9 +1386,7 @@ int uavcan_main(int argc, char *argv[])
hardpoint_id < 9 &&
command >= 0 &&
command < 11) {
// call something
// dosent work ??
// _hardpoint_controller.set_command((uint8_t) hardpoint_id, (uint16_t) command);
inst->hardpoint_controller_set((uint8_t) hardpoint_id, (uint16_t) command);
}
else {
errx(1, "Are you nuts?");
+2
View File
@@ -140,6 +140,8 @@ public:
int get_param(int remote_node_id, const char *name);
int reset_node(int remote_node_id);
void hardpoint_controller_set(uint8_t hardpoint_id, uint16_t command);
private:
void fill_node_info();
int init(uavcan::NodeID node_id);