premiere ebauche

Dependencies:   mbed PinDetect

Committer:
shovelcat
Date:
Sun Nov 18 03:30:57 2018 +0000
Revision:
12:cf97590d9df2
Parent:
10:f0b382368614
"Plan B" samedi avec Sophia. Ajoute le timestamp, ajouter du code pas encore test pour le CAN (Energy SoC, motorCurrent)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shovelcat 10:f0b382368614 1 #ifndef RECOMMENDEDSPEED_HPP
shovelcat 10:f0b382368614 2 #define RECOMMENDEDSPEED_HPP
shovelcat 10:f0b382368614 3
shovelcat 10:f0b382368614 4 #include <vector>
shovelcat 10:f0b382368614 5
shovelcat 10:f0b382368614 6 class Segment : public std::vector<float>
shovelcat 10:f0b382368614 7 {
shovelcat 10:f0b382368614 8 public:
shovelcat 10:f0b382368614 9 Segment(std::vector<float> vals);
shovelcat 10:f0b382368614 10
shovelcat 10:f0b382368614 11 float getSpeed();
shovelcat 10:f0b382368614 12 void incrementIndex();
shovelcat 10:f0b382368614 13
shovelcat 10:f0b382368614 14 protected:
shovelcat 10:f0b382368614 15 int currentIndex;
shovelcat 10:f0b382368614 16 };
shovelcat 10:f0b382368614 17
shovelcat 10:f0b382368614 18 class Parcours : public std::vector<Segment>
shovelcat 10:f0b382368614 19 {
shovelcat 10:f0b382368614 20 public:
shovelcat 10:f0b382368614 21 Parcours();
shovelcat 10:f0b382368614 22
shovelcat 10:f0b382368614 23 Segment& getSegment();
shovelcat 10:f0b382368614 24 void incrementIndex();
shovelcat 10:f0b382368614 25
shovelcat 10:f0b382368614 26 protected:
shovelcat 10:f0b382368614 27 int currentSegmentIndex;
shovelcat 10:f0b382368614 28 };
shovelcat 10:f0b382368614 29
shovelcat 10:f0b382368614 30 #endif