Skip to content

Commit

Permalink
Rename canBusLauncher app to launchCanBus
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Nov 19, 2019
1 parent c6b49b4 commit 647015d
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion programs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright: Universidad Carlos III de Madrid (C) 2013-2014
# Authors: Juan G. Victores & Raúl de Santos Rico

add_subdirectory(canBusLauncher)
#add_subdirectory(checkCanBus)
add_subdirectory(dumpCanBus)
add_subdirectory(grabberControls2Gui)
add_subdirectory(launchCanBus)
add_subdirectory(sensorReader)
17 changes: 0 additions & 17 deletions programs/canBusLauncher/CMakeLists.txt

This file was deleted.

17 changes: 17 additions & 0 deletions programs/launchCanBus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
option(ENABLE_launchCanBus "Enable/disable launchCanBus program" ON)

if(ENABLE_launchCanBus)

add_executable(launchCanBus main.cpp
LaunchCanBus.hpp
LaunchCanBus.cpp)

target_link_libraries(launchCanBus YARP::YARP_OS
YARP::YARP_dev
YARP::YARP_init
ROBOTICSLAB::ColorDebug)

install(TARGETS launchCanBus
DESTINATION ${CMAKE_INSTALL_BINDIR})

endif()
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-

#include "CanBusLauncher.hpp"
#include "LaunchCanBus.hpp"

#include <cstdio>
#include <string>
Expand All @@ -23,11 +23,11 @@ using namespace roboticslab;

/************************************************************************/

bool CanBusLauncher::configure(yarp::os::ResourceFinder &rf)
bool LaunchCanBus::configure(yarp::os::ResourceFinder &rf)
{
if (rf.check("help"))
{
std::printf("CanBusLauncher options:\n");
std::printf("LaunchCanBus options:\n");
std::printf("\t--help (this help)\t--from [file.ini]\t--context [path]\t--mode [pos]\t--homePoss\n\n");
CD_DEBUG_NO_HEADER("%s\n", rf.toString().c_str());
return false;
Expand Down Expand Up @@ -252,21 +252,21 @@ bool CanBusLauncher::configure(yarp::os::ResourceFinder &rf)

/************************************************************************/

bool CanBusLauncher::updateModule()
bool LaunchCanBus::updateModule()
{
return true;
}

/************************************************************************/

double CanBusLauncher::getPeriod()
double LaunchCanBus::getPeriod()
{
return 3.0;
}

/************************************************************************/

bool CanBusLauncher::close()
bool LaunchCanBus::close()
{
for (int i = 0; i < wrapperDevices.size(); i++)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-

#ifndef __CAN_BUS_LAUNCHER__
#define __CAN_BUS_LAUNCHER__
#ifndef __LAUNCH_CAN_BUS__
#define __LAUNCH_CAN_BUS__

#include <yarp/os/RFModule.h>
#include <yarp/dev/PolyDriverList.h>
Expand All @@ -10,14 +10,14 @@ namespace roboticslab
{

/**
* @ingroup canBusLauncher
* @ingroup launchCanBus
*
* @brief Launches one or more bus drivers, and controlboardwrapper2 instances
* that wrap corresponding nodes. A controlboardwrapper2 may be used through a
* YARP remote_controlboard or directly through low-level YARP controlboardwrapper2
* RPC commands.
*/
class CanBusLauncher : public yarp::os::RFModule
class LaunchCanBus : public yarp::os::RFModule
{
public:
bool configure(yarp::os::ResourceFinder &rf);
Expand All @@ -33,4 +33,4 @@ class CanBusLauncher : public yarp::os::RFModule

} // namespace roboticslab

#endif // __CAN_BUS_LAUNCHER__
#endif // __LAUNCH_CAN_BUS__
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
/**
*
* @ingroup yarp_devices_programs
* \defgroup canBusLauncher canBusLauncher
* \defgroup launchCanBus launchCanBus
*
* @brief Creates an instance of roboticslab::CanBusLauncher.
* @brief Creates an instance of roboticslab::launchCanBus.
*/

#include <yarp/os/Network.h>
#include <yarp/os/ResourceFinder.h>

#include <ColorDebug.h>

#include "CanBusLauncher.hpp"
#include "LaunchCanBus.hpp"

int main(int argc, char *argv[])
{
yarp::os::ResourceFinder rf;
rf.setVerbose(true);
rf.setDefaultContext("canBusLauncher");
rf.setDefaultConfigFile("canBusLauncher.ini");
rf.setDefaultContext("launchCanBus");
rf.setDefaultConfigFile("launchCanBus.ini");
rf.configure(argc, argv);

CD_INFO("Checking for yarp network... ");
Expand All @@ -35,7 +35,7 @@ int main(int argc, char *argv[])

CD_SUCCESS_NO_HEADER("[ok]\n");

roboticslab::CanBusLauncher mod;
roboticslab::LaunchCanBus mod;

if (mod.configure(rf))
{
Expand Down
8 changes: 4 additions & 4 deletions share/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ yarp_install(FILES ymanager.ini

### Go through single applications

if(ENABLE_canBusLauncher)
add_subdirectory(canBusLauncher)
endif()

if(ENABLE_checkCanBus)
add_subdirectory(checkCanBus)
endif()
Expand All @@ -19,6 +15,10 @@ if(ENABLE_dumpCanBus)
add_subdirectory(dumpCanBus)
endif()

if(ENABLE_launchCanBus)
add_subdirectory(launchCanBus)
endif()

if(ENABLE_SpaceNavigator)
add_subdirectory(spaceNavigator)
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ yarp_install(FILES conf/oneCanBusOneWrapper.ini
conf/oneCanBusOneWrapper-left-arm.ini
conf/oneCanBusOneWrapper-right-arm.ini
conf/twoCanBusThreeWrappers.ini
DESTINATION ${ROBOTICSLAB-YARP-DEVICES_CONTEXTS_INSTALL_DIR}/canBusLauncher)
DESTINATION ${ROBOTICSLAB-YARP-DEVICES_CONTEXTS_INSTALL_DIR}/launchCanBus)

0 comments on commit 647015d

Please sign in to comment.