Denver trai project

Dependencies:   mbed TextLCD

Committer:
mglmx
Date:
Thu Jun 14 10:14:59 2018 +0000
Revision:
35:cfcfeccb959e
Created class position and sensors initialized.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mglmx 35:cfcfeccb959e 1 #include <vector>
mglmx 35:cfcfeccb959e 2 using namespace std;
mglmx 35:cfcfeccb959e 3 class Position{
mglmx 35:cfcfeccb959e 4 private:
mglmx 35:cfcfeccb959e 5 int position;
mglmx 35:cfcfeccb959e 6 vector <int> previous_cw;
mglmx 35:cfcfeccb959e 7 vector <int> previous_ccw;
mglmx 35:cfcfeccb959e 8 public:
mglmx 35:cfcfeccb959e 9 Position(int p){
mglmx 35:cfcfeccb959e 10 position = p;
mglmx 35:cfcfeccb959e 11 }
mglmx 35:cfcfeccb959e 12
mglmx 35:cfcfeccb959e 13 vector <int> get_previous_cw(){
mglmx 35:cfcfeccb959e 14 return previous_cw;
mglmx 35:cfcfeccb959e 15 }
mglmx 35:cfcfeccb959e 16
mglmx 35:cfcfeccb959e 17 vector <int> get_previous_ccw(){
mglmx 35:cfcfeccb959e 18 return previous_ccw;
mglmx 35:cfcfeccb959e 19 }
mglmx 35:cfcfeccb959e 20
mglmx 35:cfcfeccb959e 21 void add_prev_cw(int pos){
mglmx 35:cfcfeccb959e 22 previous_cw.push_back(pos);
mglmx 35:cfcfeccb959e 23 };
mglmx 35:cfcfeccb959e 24
mglmx 35:cfcfeccb959e 25 void add_prev_ccw(int pos){
mglmx 35:cfcfeccb959e 26 previous_ccw.push_back(pos);
mglmx 35:cfcfeccb959e 27 };
mglmx 35:cfcfeccb959e 28 };