Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos ros_lib_melodic
OmniWheel.cpp
00001 // Mbed Library 00002 #include <vector> 00003 // Header File 00004 #include "OmniWheel.h" 00005 00006 using namespace std; 00007 00008 // Constructor 00009 OmniWheel::OmniWheel() { 00010 } 00011 00012 // Destructor 00013 OmniWheel::~OmniWheel() { 00014 } 00015 00016 // Function 00017 void OmniWheel::clear() { 00018 this->vel.clear(); 00019 this->rpm.clear(); 00020 this->pwm.clear(); 00021 } 00022 00023 // -> Getter 00024 int OmniWheel::getWheelNum() { 00025 return this->wheel_num; 00026 } 00027 00028 vector<double> OmniWheel::getVel() { 00029 return this->vel; 00030 } 00031 00032 vector<double> OmniWheel::getRpm() { 00033 return this->rpm; 00034 } 00035 00036 vector<double> OmniWheel::getPwm() { 00037 return this->pwm; 00038 } 00039 00040 // -> Setter 00041 void OmniWheel::setWheelNum(int _wheel_num) { 00042 this->wheel_num = _wheel_num; 00043 } 00044 00045 void OmniWheel::setVel(double _vel) { 00046 this->vel.push_back(_vel); 00047 } 00048 00049 void OmniWheel::setRpm(double _rpm) { 00050 this->rpm.push_back(_rpm); 00051 } 00052 00053 void OmniWheel::setPwm(double _pwm) { 00054 this->pwm.push_back(_pwm); 00055 }
Generated on Sat Jul 23 2022 22:59:41 by
1.7.2