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.
Revision 90:4e47612bc593, committed 2022-10-27
- Comitter:
- mikkelbredholt
- Date:
- Thu Oct 27 11:13:59 2022 +0000
- Parent:
- 89:5ea90b86fefb
- Commit message:
- BatteriCheckMedOptimerede v?rdier1
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Oct 25 14:54:45 2022 +0000 +++ b/main.cpp Thu Oct 27 11:13:59 2022 +0000 @@ -168,14 +168,14 @@ int PS_BatteryTest(void){ /* Test battery voltage, if the robot is not headed for pit */ - const float BATVOLTTRESHOLD = 0.05; // Treshold i volt + const float BATVOLTTRESHOLD = 4.2; // Treshold i volt int result = 0; int BatteryTestCounter; /*Test if the voltage is below the threshold if true 10 times in row, turn on go to pit mode*/ if (m3pi.battery() <= BATVOLTTRESHOLD ){ - if (++BatteryTestCounter > 10){ + if (++BatteryTestCounter > 3){ result = 1; // Set goto pit condition LED_Control(1, 1); m3pi.cls();