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
Map/Objectifs/Obj_depot.cpp
- Committer:
- Jagang
- Date:
- 2015-05-24
- Revision:
- 0:b127c787a51b
File content as of revision 0:b127c787a51b:
#include "Obj_depot.h" extern Motor motorL; extern Motor motorR; extern bool interruption; Obj_depot::Obj_depot(float x, float y, float theta, AX12 *ax12_pince) :Objectif(x,y,theta) { this->ax12_pince = ax12_pince; desactivate(); } void Obj_depot::run() { ax12_pince->setMaxTorque(MAX_TORQUE); wait(0.1); ax12_pince->setGoal(PINCE_OUVERTE); wait(1); if(!interruption) { motorL.setSpeed(-0.3); motorR.setSpeed(-0.3); wait(0.5); motorL.setSpeed(0); motorR.setSpeed(0); } done = true; } int Obj_depot::isActive() { if(!active) return false; if(ax12_pince->getGoal() == PINCE_OUVERTE) return false; return true; }