publish_control_factory.cpp
Go to the documentation of this file.
1 /*
2 * Unpublished Copyright (c) 2009-2018 AutonomouStuff, LLC, All Rights Reserved.
3 *
4 * This file is part of the PACMod ROS 1.0 driver which is released under the MIT license.
5 * See file LICENSE included with this software or go to https://opensource.org/licenses/MIT for full license details.
6 */
7 
9 
10 using namespace AS::Joystick;
11 
13 {}
14 
15 std::unique_ptr<PublishControl> PublishControlFactory::create(int board_rev)
16 {
17  if (board_rev == 1 || board_rev == 2)
18  return std::unique_ptr<PublishControlBoardRev2>(new PublishControlBoardRev2);
19  else if (board_rev == 3)
20  return std::unique_ptr<PublishControlBoardRev3>(new PublishControlBoardRev3);
21  else
22  throw std::invalid_argument("Invalid option.");
23 }
static std::unique_ptr< PublishControl > create(int board_rev)


pacmod_game_control
Author(s): Joe Driscoll
autogenerated on Thu Jun 6 2019 19:19:40