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.
Diff: main.cpp
- Revision:
- 66:6403ec154b77
- Parent:
- 63:be66d3b84cef
- Parent:
- 65:b6dad21c9e0d
- Child:
- 67:990fbcfee16f
--- a/main.cpp Wed Oct 12 10:39:33 2022 +0000 +++ b/main.cpp Wed Oct 12 10:48:42 2022 +0000 @@ -19,8 +19,8 @@ #define I_TERM 0 #define D_TERM 20 -// Ccount before test -#define CYCLEBEFORETEST 4500 +// loopcount before test +#define LOOPSBEFORETEST 9000 // Textfile paths #define PITLOGPATH "/local/pitlog.txt" @@ -57,7 +57,7 @@ /*Team 7 Variabels*/ int gotoPit = 0; // wether or not the robot is heading to pit. Initialstate false. - int ccount = 0; //used to count cycles + int loopcount = 0; //used to count loops /*Printing secret cat mission*/ LCD_InitialMessages(); @@ -69,10 +69,12 @@ while (1) { /* If cycle count divided by 100 does not have a rest. test if pit */ - if (ccount % CYCLEBEFORETEST == 0 && gotoPit == 0) + if (loopcount % LOOPSBEFORETEST == 0 && gotoPit == 0) { - TE_LogVoltage(ccount); + + TE_LogVoltage(loopcount); gotoPit = PS_BatteryTest(); + } if (gotoPit == 1) { @@ -117,7 +119,7 @@ m3pi.left_motor(left); m3pi.right_motor(right); - ccount++; + loopcount++; } // PS_DisplayNumberofPS();