Changeset 99 in pacpussensors for trunk/Wifibot/wifibot.cpp


Ignore:
Timestamp:
Oct 15, 2015, 2:47:01 PM (9 years ago)
Author:
nguyenhu
Message:

compilation under linux with 0.2.X framework

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wifibot/wifibot.cpp

    r22 r99  
    55//  author:     Pierre Hudelaine
    66//              Copyright Heudiasyc UMR UTC/CNRS 7253
    7 // 
     7//
    88//  version:    $Id: $
    99//
     
    2222// Construct the factory
    2323//////////////////////////////////////////////////////////////////////////
    24 static ComponentFactory <Wifibot> sFactory("Wifibot"); 
     24static ComponentFactory <Wifibot> sFactory("Wifibot");
    2525
    2626//////////////////////////////////////////////////////////////////////////
     
    2828//////////////////////////////////////////////////////////////////////////
    2929Wifibot::Wifibot(QString name)
    30     : ComponentBase( name ) 
     30    : ComponentBase( name )
    3131{
    32  
    33 } 
     32
     33}
    3434
    3535
     
    3737// Destructor
    3838//////////////////////////////////////////////////////////////////////////
    39 Wifibot::~Wifibot() 
     39Wifibot::~Wifibot()
    4040{
    41  
     41
    4242}
    4343
    4444//////////////////////////////////////////////////////////////////////////
    45 // Called by the ComponentManager to pass the XML parameters to the 
    46 // component 
     45// Called by the ComponentManager to pass the XML parameters to the
     46// component
    4747//////////////////////////////////////////////////////////////////////////
    48 ComponentBase::COMPONENT_CONFIGURATION  Wifibot::configureComponent( XmlComponentConfig config ) 
    49 { 
     48ComponentBase::COMPONENT_CONFIGURATION  Wifibot::configureComponent( XmlComponentConfig config )
     49{
    5050    QString pacpusSocket = config.getProperty("socketComponent");
    51     ComponentManager * mgr = ComponentManager::getInstance();
    52     pacpusSocket_ = dynamic_cast<PacpusSocket *>(mgr->getComponent(pacpusSocket));
     51    //ComponentManager * mgr = ComponentManager::getInstance();
     52    pacpusSocket_ = dynamic_cast<PacpusUDPSocket *>(ComponentManager::getInstance()->getComponent(pacpusSocket).get());
    5353    if (!pacpusSocket_) {
    5454            qWarning() << "Failed to get component " << pacpusSocket;
    5555            return ComponentBase::NOT_CONFIGURED;
    5656    }
    57  
    58     return ComponentBase::CONFIGURED_OK; 
    59 } 
     57
     58    return ComponentBase::CONFIGURED_OK;
     59}
    6060
    6161
     
    6464// Called by the ComponentManager to start the component
    6565//////////////////////////////////////////////////////////////////////////
    66 void Wifibot::startActivity() 
    67 { 
     66void Wifibot::startActivity()
     67{
    6868    dualshock = new PS3remote(pacpusSocket_);
    6969    dualshock->start();
Note: See TracChangeset for help on using the changeset viewer.