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:
- 52:6f4f034f117b
- Parent:
- 51:6cd89bd6fcaa
--- a/main.cpp Wed Jul 17 03:40:12 2019 +0000 +++ b/main.cpp Fri Jun 17 07:58:45 2022 +0000 @@ -54,7 +54,8 @@ PositionSensorAM5147 spi(16384, 0.0, NPP); -volatile int count = 0; +//volatile int count = 0; +volatile int count1 = 0; volatile int state = REST_MODE; volatile int state_change; @@ -200,7 +201,8 @@ case MOTOR_MODE: // Run torque control if(state_change){ enter_torque_mode(); - count = 0; + //count = 0; + count1 = 0; } else{ /* @@ -226,7 +228,8 @@ commutate(&controller, &observer, &gpio, controller.theta_elec); // Run current loop controller.timeout++; - count++; + //count++; + count1++; } break;