syncTimer can be on flawed time units
This commit is contained in:
@@ -104,7 +104,7 @@ void handleStepper(void)
|
|||||||
delayT = 500 - diffT;
|
delayT = 500 - diffT;
|
||||||
if (delayT > 0 && delayT < 900)
|
if (delayT > 0 && delayT < 900)
|
||||||
{
|
{
|
||||||
setFrequencyAdjustedMicrosSeconds(syncTimer, delayT);
|
syncTimer->setOverflow(delayT, MICROSEC_FORMAT);
|
||||||
syncTimer->refresh();
|
syncTimer->refresh();
|
||||||
syncTimer->resume();
|
syncTimer->resume();
|
||||||
}
|
}
|
||||||
@@ -177,6 +177,7 @@ static esc_cfg_t config =
|
|||||||
.esc_hw_eep_handler = NULL,
|
.esc_hw_eep_handler = NULL,
|
||||||
.esc_check_dc_handler = dc_checker,
|
.esc_check_dc_handler = dc_checker,
|
||||||
};
|
};
|
||||||
|
|
||||||
void measureCrystalFrequency(void);
|
void measureCrystalFrequency(void);
|
||||||
|
|
||||||
volatile byte serveIRQ = 0;
|
volatile byte serveIRQ = 0;
|
||||||
@@ -184,8 +185,6 @@ volatile byte serveIRQ = 0;
|
|||||||
void setup(void)
|
void setup(void)
|
||||||
{
|
{
|
||||||
Serial1.begin(115200);
|
Serial1.begin(115200);
|
||||||
delay(2000);
|
|
||||||
Serial1.printf("Hello world\n");
|
|
||||||
#if 0
|
#if 0
|
||||||
measureCrystalFrequency(); // Calibrate crystal frequency
|
measureCrystalFrequency(); // Calibrate crystal frequency
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user