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
Revision 12:4310fb637705, committed 2018-04-06
- Comitter:
- x58alex41
- Date:
- Fri Apr 06 00:06:51 2018 +0000
- Parent:
- 11:fb806a599444
- Commit message:
- started gyro
Changed in this revision
--- a/Gyro.cpp Thu Apr 05 23:37:51 2018 +0000
+++ b/Gyro.cpp Fri Apr 06 00:06:51 2018 +0000
@@ -1,4 +1,8 @@
-//
#include "Gyro.h"
+int gyro::angle()
+{
+
+
+}
\ No newline at end of file
--- a/Gyro.h Thu Apr 05 23:37:51 2018 +0000
+++ b/Gyro.h Fri Apr 06 00:06:51 2018 +0000
@@ -1,9 +1,17 @@
#ifndef _Gyro_
-#define _Gyro_
+#define _Gyro_
#include "globals.h"
AnalogIn Gyro (PC_4);
-
+class gyro
+{
+public:
+ gyro();
+ int angle();
+private:
+ int m_angle;
+ int m_zero;
+};
#endif
\ No newline at end of file
--- a/flood_fill.cpp Thu Apr 05 23:37:51 2018 +0000
+++ b/flood_fill.cpp Fri Apr 06 00:06:51 2018 +0000
@@ -5,18 +5,18 @@
for(int i=0; i<7; i++) {
for(int j=0; j<7; j++) {
m_cells[i][j].dist=14-i-j;
- m_cells[i][16-j].dist=14-i-j;
- m_cells[16-i][j].dist=14-i-j;
- m_cells[16-i][16-j].dist=14-i-j;
+ m_cells[i][15-j].dist=14-i-j;
+ m_cells[15-i][j].dist=14-i-j;
+ m_cells[15-i][16-j].dist=14-i-j;
}
}
for(int i=0; i< 16; i++) {
- m_cells[i][0].left_clear=false;
- m_cells[i][15].right_clear=false;
+ m_cells[i][0].down_clear=false;
+ m_cells[i][15].up_clear=false;
}
for(int i=0; i< 16; i++) {
- m_cells[0][i].down_clear=false;
- m_cells[15][i].up_clear=false;
+ m_cells[0][i].left_clear=false;
+ m_cells[15][i].right_clear=false;
}
}