//--------------------------------------------------------------------------------------
CProgressBarVertical::CProgressBarVertical ( CDialog *pDialog )
{
	SetControl ( pDialog, TYPE_PROGRESSBARVERTICAL );

	m_fStep = 1.f;
	m_fValue = 0.f;
	m_fMax = 100.f;
}
示例#2
0
//--------------------------------------------------------------------------------------
CProgressBarHorizontal::CProgressBarHorizontal ( CDialog *pDialog )
{
	SetControl ( pDialog, TYPE_PROGRESSBARHORIZONTAL );

	m_fStep = 1.f;
	m_fValue = 0.f;
	m_fMax = 100.f;
}
示例#3
0
CTrackBarVertical::CTrackBarVertical ( CDialog *pDialog )
{
	SetControl ( pDialog, TYPE_TRACKBARVERTICAL );

	m_nMin = 0;
	m_nMax = 1;
	m_nValue = 1;
}
TEST_F(V4L2ControlDelegateTest, SetSuccess) {
  uint8_t input = 10;
  int32_t conversion_result = 99;
  EXPECT_CALL(*mock_converter_, MetadataToV4L2(input, _))
      .WillOnce(DoAll(SetArgPointee<1>(conversion_result), Return(0)));
  EXPECT_CALL(*mock_device_, SetControl(control_id_, conversion_result, _))
      .WillOnce(Return(0));

  ASSERT_EQ(dut_->SetValue(input), 0);
}
示例#5
0
void Beluga::SafeStop()
{
	while(1000.0*(MT_getTimeSec() - m_dTimeOfLastSend) < m_dMinCommandPeriod_msec)
	{
		/* wait until we can send the command */
	};
	SendCommand(0, 0, 0);
	std::vector<double> u(BELUGA_CONTROL_SIZE, 0.0);
	SetControl(u);
}
CScrollBarVertical::CScrollBarVertical( CDialog *pDialog )
{
	SetControl ( pDialog, TYPE_SCROLLBARVERTICAL ); 
	
	m_bShowThumb = true;
	m_bDrag = false;

	m_nStep = 1;
	m_nPosition = 0;
	m_nPageSize = 1;
	m_nStart = 0;
	m_nEnd = 1;
	nThumbOffset = 0;
	m_Arrow = CLEAR;
}
示例#7
0
wxSFControlShape::wxSFControlShape(wxWindow *ctrl, const wxRealPoint& pos, const wxRealPoint& size, wxSFDiagramManager* manager)
: wxSFRectShape(pos, size, manager)
{
    SetControl(ctrl);
    m_nProcessEvents = sfdvCONTROLSHAPE_PROCESSEVENTS;
    m_ModFill = sfdvCONTROLSHAPE_MODFILL;
    m_ModBorder = sfdvCONTROLSHAPE_MODBORDER;
    m_nControlOffset = sfdvCONTROLSHAPE_CONTROLOFFSET;

    m_pEventSink = new EventSink(this);

    m_Fill = *wxTRANSPARENT_BRUSH;
    m_Border = *wxTRANSPARENT_PEN;

    MarkSerializableDataMembers();
}
void E_Tortoise_Fly::Update(float gameTime)
{
    if (timelife > 0)
        timelife++;
    if (timelife == 150) {
        timelife = 0;
        status = 0;
        m_hSpeed.x = vx;
    }
    Object::Update(gameTime);
    if (IsControl)
        SetControl();
    else
        MoveObject();
    Collision_Shell_Object();
    CollistionWithObject();
    SetSprite();
    DelayNext(3);
}
示例#9
0
ccsCOMPL_STAT wsf2ex1APPLICATION::Init(int argCount, char *arg[])
{
    wsf2libLOG_TRACE();
    ErrReset();


    // Turn off logging of warning on EXIT command
    evhTASK::LogExitWarning(FALSE);

    // Parses the command line arguments
    // and extract the configuration parameters
    // for ENV NAME, DB POINT and PROC NAME from the
    // command line or from the enviroment variables
    if (EvaluateArgs(argCount, arg, wsf2ex1DB_ROOT_POINT) == FAILURE)
	{
	errAdd(wsf2ex1MOD, wsf2ex1ERR_INIT, __FILE_LINE__, "wrong argument(s)");
	return FAILURE;
	}

    // Initialize CCS and connect to database
    if(InitCCS() == FAILURE)
	{
	errAdd(wsf2ex1MOD, wsf2ex1ERR_INIT, __FILE_LINE__, "cannot init CCS");
	return FAILURE;      
	}

    // Logs current startup configuration
    eccsLOG_1(("%s - Application started (proc name: %s, DB root point: %s)", 
	       GetProcName(), GetProcName(), GetDbRoot()));
    logData(wsf2ex1MOD,"%s - Application started (proc name: %s, DB root point: %s)", 
	    GetProcName(), GetProcName(), GetDbRoot());

   /*
    * Create factory for ACTIONS, DATA, CONFIG and CONTROL
    */
    wsf2libASSERT(mActionMgr == NULL);
    mActionMgr = new wsf2ex1ACTION_MGR(GetDbRoot(), argCount, arg, GetEventMgr());
    if (mActionMgr == NULL)
	{
	errAdd(wsf2ex1MOD, wsf2ex1ERR_FATAL, __FILE_LINE__, "no memory for allocating wsf2ex1ACTION_MGR");
	return FAILURE;
	}
    if (wsf2libHELPER::ObjectOk(mActionMgr, "ACTION_MGR") == ccsFALSE)
	{
	errAdd(wsf2ex1MOD, wsf2ex1ERR_CREATE, __FILE_LINE__, "wsf2ex1ACTION_MGR");
	return FAILURE;	
	}

    /*
     * Set FSM context
     * TBD: rename method
     */
    SetControl(mActionMgr->GetControl());

    /*
     * Instantiate events and actions
     */
    if (CreateEvents(wsf2ex1EVENTS_FILENAME) == FAILURE)
	{
	errAdd(wsf2ex1MOD, wsf2ex1ERR_CREATE, __FILE_LINE__, "Events");
	return FAILURE;	
	}
    if (mActionMgr->CreateActions() == FAILURE)
	{
	errAdd(wsf2ex1MOD, wsf2ex1ERR_CREATE, __FILE_LINE__, "Actions");
	return FAILURE;	
	}
    /*
     * Load SCXML Model
     */
    if (LoadModel(wsf2ex1MODEL_FILENAME, mActionMgr->SCXMLGetActions(), mActionMgr->SCXMLGetActivities()) == FAILURE)
	{
	errAdd(wsf2ex1MOD, wsf2ex1ERR_FATAL, __FILE_LINE__, "cannot load SCXML model");
	return FAILURE;
	}

    /*
     * Initialize all events and actions and data structures
     */
    if (mActionMgr->Init() == FAILURE)
	{
	errAdd(wsf2ex1MOD, wsf2ex1ERR_FATAL, __FILE_LINE__, "initializing actions and data structures");
	return FAILURE;
	}

    /*
     * Start the execution of SCXML model
     */
    if (StartModel() == FAILURE)
	{
	errAdd(wsf2ex1MOD, wsf2ex1ERR_FATAL, __FILE_LINE__, "cannot start SCXML model execution");
	return FAILURE;
	}

    return SUCCESS;
} 
示例#10
0
void EncoderMFC::Autoconfig(){

    //encoder->SetControl(V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM,1);

    SetControl(V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP,20);
    SetControl(V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP,20);
    SetControl(V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP,31);

    SetControl(V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP,20);
    SetControl(V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP,31);

    SetControl(V4L2_CID_MPEG_VIDEO_HEADER_MODE,V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME);
    SetControl(V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P,1);

    SetControl(V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE,1);
    SetControl(V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE,1);
    SetControl(V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF,1000);
    SetControl(V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE,V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED);

    SetControl(V4L2_CID_MPEG_VIDEO_B_FRAMES,0);
    SetControl(V4L2_CID_MPEG_VIDEO_GOP_SIZE,15);

}
示例#11
0
CButton::CButton ( CDialog *pDialog )
{
	SetControl ( pDialog, TYPE_BUTTON );
}
示例#12
0
CPictureBox::CPictureBox ( CDialog *pDialog )
{
	SetControl ( pDialog, EControlType::TYPE_IMAGE );
	m_fRotImage = 0.f;
}