当前位置: 首页>>代码示例>>C++>>正文


C++ Kiss::empty方法代码示例

本文整理汇总了C++中Kiss::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ Kiss::empty方法的具体用法?C++ Kiss::empty怎么用?C++ Kiss::empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Kiss的用法示例。


在下文中一共展示了Kiss::empty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: init

bool APMrover_base::init(void* pKiss)
{
	CHECK_F(this->ActionBase::init(pKiss)==false);
	Kiss* pK = (Kiss*)pKiss;
	pK->m_pInst = this;

	Kiss* pCC;
	APMrover_PID cPID;

	pCC = pK->o("steer");
	CHECK_F(pCC->empty());

	F_ERROR_F(pCC->v("P", &cPID.m_P));
	F_INFO(pCC->v("I", &cPID.m_I));
	F_INFO(pCC->v("Imax", &cPID.m_Imax));
	F_INFO(pCC->v("D", &cPID.m_D));
	F_INFO(pCC->v("dT", &cPID.m_dT));
	m_pidSteer = cPID;

	pCC = pK->o("thrust");
	CHECK_F(pCC->empty());

	F_ERROR_F(pCC->v("P", &cPID.m_P));
	F_INFO(pCC->v("I", &cPID.m_I));
	F_INFO(pCC->v("Imax", &cPID.m_Imax));
	F_INFO(pCC->v("D", &cPID.m_D));
	F_INFO(pCC->v("dT", &cPID.m_dT));
	m_pidThrust = cPID;

	//init controls
	m_lastHeartbeat = 0;
	m_iHeartbeat = 0;

	return true;
}
开发者ID:yankailab,项目名称:OpenKAI,代码行数:35,代码来源:APMrover_base.cpp

示例2: init

bool RC_visualFollow::init(void* pKiss)
{
	CHECK_F(!this->ActionBase::init(pKiss));
	Kiss* pK = (Kiss*)pKiss;

	m_roll.reset();
	m_pitch.reset();
	m_yaw.reset();
	m_alt.reset();

	F_ERROR_F(pK->v("targetX", &m_roll.m_targetPos));
	F_ERROR_F(pK->v("targetY", &m_pitch.m_targetPos));
	F_INFO(pK->v("ROIsizeFrom", &m_ROIsizeFrom));
	F_INFO(pK->v("ROIsizeTo", &m_ROIsizeTo));
	F_INFO(pK->v("ROIsizeStep", &m_ROIsizeStep));

	//setup UI
	Kiss* pC;

	pC = pK->o("assist");
	if (!pC->empty())
	{
		m_pUIassist = new UI();
		F_FATAL_F(m_pUIassist->init(pC));
	}

	pC = pK->o("drawRect");
	if (!pC->empty())
	{
		m_pUIdrawRect = new UI();
		F_FATAL_F(m_pUIdrawRect->init(pC));
	}

	pK->m_pInst = this;

	return true;
}
开发者ID:yankailab,项目名称:OpenKAI,代码行数:37,代码来源:RC_visualFollow.cpp

示例3: init

bool _AutoPilot::init(void* pKiss)
{
    CHECK_F(!this->_ThreadBase::init(pKiss));
    Kiss* pK = (Kiss*)pKiss;
    pK->m_pInst = this;

    //create action instance
    Kiss* pCC = pK->o("action");
    CHECK_T(pCC->empty());
    Kiss** pItr = pCC->getChildItr();

    int i = 0;
    while (pItr[i])
    {
        Kiss* pAction = pItr[i];
        i++;

        bool bInst = false;
        F_INFO(pAction->v("bInst", &bInst));
        if (!bInst)continue;
        if (m_nAction >= N_ACTION)LOG(FATAL);

        ActionBase** pA = &m_pAction[m_nAction];
        m_nAction++;

        //Add action modules below

        ADD_ACTION(RC_visualFollow);
        ADD_ACTION(APMcopter_landing);
        ADD_ACTION(APMcopter_guided);
        ADD_ACTION(HM_base);
        ADD_ACTION(HM_follow);
        ADD_ACTION(APMrover_base);
        ADD_ACTION(APMrover_follow);

        //Add action modules above

        LOG_E("Unknown action class: "+pAction->m_class);
    }

    return true;
}
开发者ID:yankailab,项目名称:OpenKAI,代码行数:42,代码来源:_AutoPilot.cpp

示例4: init

bool _Mavlink::init(void* pKiss)
{
	CHECK_F(!this->_ThreadBase::init(pKiss));
	Kiss* pK = (Kiss*) pKiss;
	pK->m_pInst = this;

	Kiss* pCC = pK->o("input");
	CHECK_F(pCC->empty());
	m_pSerialPort = new SerialPort();
	CHECK_F(!m_pSerialPort->init(pCC));

	//init param
	m_systemID = 1;
	m_componentID = MAV_COMP_ID_PATHPLANNER;
	m_type = MAV_TYPE_ONBOARD_CONTROLLER;
	m_targetComponentID = 0;
	m_msg.sysid = 0;
	m_msg.compid = 0;
	m_status.packet_rx_drop_count = 0;

	return true;
}
开发者ID:yankailab,项目名称:OpenKAI,代码行数:22,代码来源:_Mavlink.cpp

示例5: init

bool RC_base::init(void* pKiss)
{
	CHECK_F(this->ActionBase::init(pKiss)==false);
	Kiss* pK = (Kiss*)pKiss;
	pK->m_pInst = this;

	RC_PID cPID;
	RC_CHANNEL RC;
	Kiss* pCC;

	pCC = pK->o("roll");
	CHECK_F(pCC->empty());

	F_ERROR_F(pCC->v("P", &cPID.m_P));
	F_ERROR_F(pCC->v("I", &cPID.m_I));
	F_ERROR_F(pCC->v("Imax", &cPID.m_Imax));
	F_ERROR_F(pCC->v("D", &cPID.m_D));
	F_ERROR_F(pCC->v("dT", &cPID.m_dT));
	m_pidRoll = cPID;

	F_ERROR_F(pCC->v("pwmL", &RC.m_pwmL));
	F_ERROR_F(pCC->v("pwmH", &RC.m_pwmH));
	F_ERROR_F(pCC->v("pwmN", &RC.m_pwmN));
	F_ERROR_F(pCC->v("pwmCh", &RC.m_iCh));
	m_rcRoll = RC;

	pCC = pK->o("pitch");
	CHECK_F(pCC->empty());

	F_ERROR_F(pCC->v("P", &cPID.m_P));
	F_ERROR_F(pCC->v("I", &cPID.m_I));
	F_ERROR_F(pCC->v("Imax", &cPID.m_Imax));
	F_ERROR_F(pCC->v("D", &cPID.m_D));
	F_ERROR_F(pCC->v("dT", &cPID.m_dT));
	m_pidPitch = cPID;

	F_ERROR_F(pCC->v("pwmL", &RC.m_pwmL));
	F_ERROR_F(pCC->v("pwmH", &RC.m_pwmH));
	F_ERROR_F(pCC->v("pwmN", &RC.m_pwmN));
	F_ERROR_F(pCC->v("pwmCh", &RC.m_iCh));
	m_rcPitch = RC;

	pCC = pK->o("alt");
	CHECK_F(pCC->empty());

	F_ERROR_F(pCC->v("P", &cPID.m_P));
	F_ERROR_F(pCC->v("I", &cPID.m_I));
	F_ERROR_F(pCC->v("Imax", &cPID.m_Imax));
	F_ERROR_F(pCC->v("D", &cPID.m_D));
	F_ERROR_F(pCC->v("dT", &cPID.m_dT));
	m_pidAlt = cPID;

	F_ERROR_F(pCC->v("pwmL", &RC.m_pwmL));
	F_ERROR_F(pCC->v("pwmH", &RC.m_pwmH));
	F_ERROR_F(pCC->v("pwmN", &RC.m_pwmN));
	F_ERROR_F(pCC->v("pwmCh", &RC.m_iCh));
	m_rcAlt = RC;

	pCC = pK->o("yaw");
	CHECK_F(pCC->empty());

	F_ERROR_F(pCC->v("P", &cPID.m_P));
	F_ERROR_F(pCC->v("I", &cPID.m_I));
	F_ERROR_F(pCC->v("Imax", &cPID.m_Imax));
	F_ERROR_F(pCC->v("D", &cPID.m_D));
	F_ERROR_F(pCC->v("dT", &cPID.m_dT));
	m_pidYaw = cPID;

	F_ERROR_F(pCC->v("pwmL", &RC.m_pwmL));
	F_ERROR_F(pCC->v("pwmH", &RC.m_pwmH));
	F_ERROR_F(pCC->v("pwmN", &RC.m_pwmN));
	F_ERROR_F(pCC->v("pwmCh", &RC.m_iCh));
	m_rcYaw = RC;

	return true;
}
开发者ID:rmackay9,项目名称:OpenKAI,代码行数:76,代码来源:RC_base.cpp


注:本文中的Kiss::empty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。