ese519
Dependencies: MRF24J40 mbed-rtos mbed
Actuator.cpp
- Committer:
- Jing_Qiu
- Date:
- 2015-03-21
- Revision:
- 0:ef293aec3a85
File content as of revision 0:ef293aec3a85:
#include "Actuator.h" Actuator::Actuator(int m_, int index_, PwmOut motor_, Timeout to_):m(m_),index(index_), motor(motor_), to(to_){} Actuator::~Actuator(){} int Actuator::getM(){ return m; } int Actuator::getIndex(){ return index; } PwmOut Actuator::getMotor() { return motor; } Timeout Actuator::getTo() { return to; } void Actuator::setM(int m_) { m = m_; } void Actuator::setIndex(int idx) { index = idx; } void Actuator::setMotor(double pw) { motor = pw; } void Actuator::shot() { setM(0); setMotor(0); } //void Actuator::updateMotor() //{ // if(getM()) getTo().attach(this,&Actuator::shot,0.2); // }