Ejemplo n.º 1
0
void Motion_controller::platform(const uint16_t &degree, const uint8_t &action)
{
	Message msg;
	switch(action)
	{
		case CAM_ROLL_LEFT:
			msg.CameraPlatformRollLeft(degree);
		break;
		case CAM_ROLL_RIGHT:
			msg.CameraPlatformRollRight(degree);
		break;
		case CAM_PITCH_UP:
			msg.CameraPlatformPitchUp(degree);
		break;
		case CAM_PITCH_DOWN:
			msg.CameraPlatformPitchDown(degree);
		break;
		case CAM_YAW_LEFT:
			msg.CameraPlatformYawCounterClk(degree);
		break;
		case CAM_YAW_RIGHT:
			msg.CameraPlatformYawClk(degree);
		break;
	}
	if(glo_motion_enable)
		msg.safe_sendMessage(this->Com->fd);
	return ;
}