Fix bug with premature step end. Refactored _delay_ms() and square() for better portability.
- Fixed a premature step end bug dating back to Simen's 0.7b edge version is fixed, from which this code is forked from. Caused by Timer2 constantly overflowing calling the Step Reset Interrupt every 128usec. Now Timer2 is always disabled after a step end and should free up some cycles for the main program. Could be more than one way to fix this problem. I'm open to suggestions. - _delay_ms() refactored to accept only constants to comply with current compilers. square() removed since not available with some compilers.
This commit is contained in:
2
config.h
2
config.h
@ -108,7 +108,7 @@
|
||||
// this delay will increase the maximum dwell time linearly, but also reduces the responsiveness of
|
||||
// run-time command executions, like status reports, since these are performed between each dwell
|
||||
// time step. Also, keep in mind that the Arduino delay timer is not very accurate for long delays.
|
||||
#define DWELL_TIME_STEP 50 // Integer (milliseconds)
|
||||
#define DWELL_TIME_STEP 50 // Integer (1-255) (milliseconds)
|
||||
|
||||
|
||||
// -----------------------------------------------
|
||||
|
Reference in New Issue
Block a user