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
Diff: Classes/Robot.cpp
- Revision:
- 11:e8c4a1c6553d
- Parent:
- 10:efa507ba2b35
--- a/Classes/Robot.cpp Thu May 23 21:26:08 2019 +0000
+++ b/Classes/Robot.cpp Mon May 27 17:42:53 2019 +0000
@@ -10,7 +10,9 @@
using namespace std;
-Robot::Robot() : laserG(Laser(PB_1)), laserD(Laser(PC_5)), laserA(Laser(PC_4)), rouleau(Rouleau(D5, D4, D6)) /*PWM, Ejecte, Gobe*/, BPs(DigitalIn(PC_2, PullDown))
+Robot::Robot()
+ : laserG(Laser(PB_1)), laserD(Laser(PC_5)), laserA(Laser(PC_4)), rouleau(Rouleau(D5, D4, D6)) /*PWM, Ejecte, Gobe*/,
+ BPs(DigitalIn(PC_2, PullDown)), LedBps(DigitalOut(LED2))
{
can_init();
}
@@ -21,13 +23,9 @@
}
/// retourne l'adresse de la premiere case d'un tableau contenant dans l'ordre la position en x et en y et l'angle theta ///
-int* Robot::getPos()
+void Robot::getPos(int* pos)
{
- static int pos[3];
-
majPos(pos);
-
- return pos;
}