New pwmCycleTime different from sync0CycleTime

This commit is contained in:
Hakan Bastedt
2024-01-20 12:37:42 +01:00
parent e6bfe4f880
commit 1f97534133
3 changed files with 9 additions and 6 deletions

View File

@@ -176,6 +176,7 @@ uint16_t dc_checker(void)
{
// Indicate we run DC
ESCvar.dcsync = 1;
StepGen::sync0CycleTime = 10*ESC_SYNC0cycletime() / 1000;
StepGen::sync0CycleTime = ESC_SYNC0cycletime() / 1000; // usecs
StepGen::pwmCycleTime = 10 * StepGen::sync0CycleTime;
return 0;
}