fix period customizable
This commit is contained in:
@@ -19,6 +19,8 @@ const float Kd = 600.0f;// D gain
|
||||
#define BASE_SPEED 1500// Slower speed (approx 10% duty of 15000)
|
||||
#define MAX_DRV 3000 // Max speed limit (20% duty)
|
||||
|
||||
#define PERIOD_MS 20
|
||||
|
||||
void main() {
|
||||
Clock_Init48MHz();
|
||||
ir_init();
|
||||
@@ -113,7 +115,7 @@ void main() {
|
||||
}
|
||||
|
||||
// F. Loop Delay (Sampling Time)
|
||||
Clock_Delay1ms(2);
|
||||
Clock_Delay1ms(PERIOD_MS);
|
||||
}
|
||||
|
||||
finish:
|
||||
|
||||
Reference in New Issue
Block a user