noResetInfo.cpp

00001 /*
00002   電源投入時からの情報を返す
00003   Satofumi KAMIMURA
00004   $Id$
00005 */
00006 
00007 #include "runCtrl.h"
00008 
00009 
00010 VXV::Position RunCtrl::getNoResetRunPosition(void) {
00011   int x = 0, y = 0, div16 = 0;
00012   if (recvNoResetPosition(&x, &y, &div16) < 0) {
00013     throw RunCtrl_Exception("Transmit fail: in recvNoResetPosition()");
00014   }
00015   return VXV::Position(x, y, VXV::Direction::rad(2.0*M_PI * div16 / 0x10000));
00016 }
00017 
00018 
00019 int RunCtrl::getBodyRotateCount(void) {
00020   int count = 0;
00021   if (recvBodyRotateCount(&count) < 0) {
00022     throw RunCtrl_Exception("Transmit fail: in recvBodyRotateCount()");
00023   }
00024   return count;
00025 }
00026 
00027 
00028 void RunCtrl::getEncoderRotateCount(int id, int count[], int num) {
00029   if (recvEncoderRotateCount(id, count, num) < 0) {
00030     throw RunCtrl_Exception("Transmit fail: in recvEncoderRotateCount()");
00031   }
00032 }
00033 

Generated on Mon Apr 13 22:52:04 2009 by  doxygen 1.5.7.1