IOCTL for Hardpoint controller and instantiation for UavcanHardpointController as a field of UavcanNode

This commit is contained in:
blah
2016-01-19 12:38:27 -08:00
committed by Lorenz Meier
parent fb4db49ea0
commit 9228e420d0
3 changed files with 12 additions and 0 deletions

View File

@@ -1107,6 +1107,12 @@ UavcanNode::ioctl(file *filp, int cmd, unsigned long arg)
break;
}
case UAVCANIOC_HARDPOINT_SET:
const auto& cmd = *reinterpret_cast<uavcan::equipment::hardpoint::Command*>(arg);
_hardpoint_controller.set_command(cmd.hardpoint_id, cmd.command);
break;
default:
ret = -ENOTTY;
break;