tests/motion:: ensure stepTimerQuantum is always respected
This catches motion stutters as fixed in
502f42b7be
pull/153/head
parent
5af7d9a10f
commit
e318a9f9c1
|
|
@ -34,7 +34,8 @@ int main(int argc, const char *argv[]) {
|
|||
const int maxJerk = 1;
|
||||
|
||||
// write common parameters
|
||||
fprintf(fd, "{\"timebase\": %lu}\n", F_CPU / config::stepTimerFrequencyDivider);
|
||||
fprintf(fd, "{\"timebase\": %lu, \"quantum\": %u}\n",
|
||||
F_CPU / config::stepTimerFrequencyDivider, config::stepTimerQuantum);
|
||||
|
||||
for (int ax_cnt = 0; ax_cnt != 2; ++ax_cnt) {
|
||||
for (int accel = 2000; accel <= 50000; accel *= 2) {
|
||||
|
|
|
|||
|
|
@ -156,6 +156,15 @@ def check_run(info, run):
|
|||
ax_info, data = run
|
||||
ax_count = len(ax_info)
|
||||
|
||||
# first and last interval should always be zero
|
||||
assert (data[0][1] == 0)
|
||||
assert (data[-1][1] == 0)
|
||||
|
||||
# ensure no interval is shorter than the specified quantum
|
||||
for i in range(1, len(data) - 2):
|
||||
interval = data[i][1]
|
||||
assert (interval >= info['quantum'])
|
||||
|
||||
# split axis information
|
||||
ax_data = []
|
||||
for ax in range(ax_count):
|
||||
|
|
|
|||
Loading…
Reference in New Issue