NIBO Library  2.11
nibocc/motco.hpp
gehe zur Dokumentation dieser Datei
00001 //
00002 //  Nibo C drivers - C functions for the Nibo robot
00003 //
00004 //  Copyright (C) 2007 by Nils Springob <nils@nicai-systems.de>
00005 //
00006 //  This program is free software; you can redistribute it and/or modify
00007 //  it under the terms of the GNU General Public License as published by
00008 //  the Free Software Foundation; either version 2 of the License, or
00009 //  (at your option) any later version.
00010 //
00011 //  This program is distributed in the hope that it will be useful,
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //  GNU General Public License for more details.
00015 //
00016 //  You should have received a copy of the GNU General Public License
00017 //  along with this program; if not, write to the Free Software
00018 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00026 #ifndef NIBOCC_MOTCO_HPP_
00027 #define NIBOCC_MOTCO_HPP_
00028 #if defined(NIBOCC_USE_MOTCO) || defined (DOXYGEN)
00029 
00030 #include <stdint.h>
00031 #include "nibo/motco.h"
00032 
00033 namespace nibocc {
00034 
00038 class MotCo
00039 {
00040   public:
00044     static int16_t get_speed_l() {return ::motco_speed_l;}
00045 
00049     static int16_t get_speed_r() {return ::motco_speed_r;}
00050 
00054     static int16_t get_ticks_l() {return ::motco_ticks_l;}
00055 
00059     static int16_t get_ticks_r() {return ::motco_ticks_r;}
00060 
00064     static uint8_t update() {return ::motco_update();}
00065 
00069     static uint8_t stop() {return ::motco_stop();}
00070 
00077     static uint8_t set_pwm(int16_t left, int16_t right) {return ::motco_setPWM(left, right);}
00078 
00085     static uint8_t set_speed(int16_t left, int16_t right) {return ::motco_setSpeed(left, right);}
00086 
00094     static uint8_t set_speed_parameters(int8_t ki, int8_t kp, int8_t kd) {return ::motco_setSpeedParameters(ki, kp, kd);}
00095 
00101     static uint8_t reset_odometry(int16_t left, int16_t right) {return ::motco_resetOdometry(left, right);}
00102 
00103 };
00104 
00105 } // namespace
00106 #endif // NIBOCC_USE_MOTCO
00107 #endif // NIBOCC_MOTCO_HPP_

Erzeugt am Fre Jun 3 2011 15:48:39 für NIBO Library von doxygen 1.7.4-20110426