Skip to content

Commit 51c47fd

Browse files
Quiet down tests/motion/g0/ check to only output on errors.
Lots of debug output was left behind. Comment it out and remove useless print statements.
1 parent 4c0e5ec commit 51c47fd

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

tests/motion/g0/checkresult

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ if samples[0][1] != 0.000000:
8282
print("error: sample 0: X starts at %.6f, not at 0.000000" % samples[0][1])
8383
sys.exit(1)
8484

85-
print("line 0: X starts at 0.000000")
85+
#print("line 0: X starts at 0.000000")
8686

8787

8888
# find where X starts moving (X is the second column, column 1)
@@ -94,7 +94,7 @@ if len(samples) == i+2:
9494
print("error: no acceleration detected, did linuxcnc take too long to start moving?")
9595
sys.exit(1)
9696

97-
print("line %d: accel phase starts" % i)
97+
#print("line %d: accel phase starts" % i)
9898

9999

100100
# now i is the sample before it starts moving
@@ -138,9 +138,9 @@ if abs(max_acceleration_ipspc - (highest_seen_accel_ipc2 * cycles_per_second)) >
138138
print("error: max accel is %.6f i/s^2" % max_acceleration_ips2)
139139
sys.exit(1)
140140

141-
print(" accel reached but did not exceed 1/2 of max accel of %.6f i/s^2" % max_acceleration_ips2)
141+
#print(" accel reached but did not exceed 1/2 of max accel of %.6f i/s^2" % max_acceleration_ips2)
142142

143-
print("line %d: entering cruise phase, vel=%.6f i/s, max_accel = %.6f i/s^2" % (i, new_v_ipc * cycles_per_second, highest_seen_accel_ipc2 * cycles_per_second * cycles_per_second))
143+
#print("line %d: entering cruise phase, vel=%.6f i/s, max_accel = %.6f i/s^2" % (i, new_v_ipc * cycles_per_second, highest_seen_accel_ipc2 * cycles_per_second * cycles_per_second))
144144

145145

146146
# now i is the first sample of the cruise phase
@@ -154,7 +154,7 @@ for i in range(i, len(samples) - 1):
154154

155155
old_v_ipc = new_v_ipc
156156

157-
print("line %d: decel phase starting, old_v=%.6f i/s, new_v=%.6f i/s" % (i, old_v_ipc * cycles_per_second, new_v_ipc * cycles_per_second))
157+
#print("line %d: decel phase starting, old_v=%.6f i/s, new_v=%.6f i/s" % (i, old_v_ipc * cycles_per_second, new_v_ipc * cycles_per_second))
158158

159159
# now i is the sample before it starts decel
160160
# verify accel does not exceed maxaccel
@@ -190,7 +190,7 @@ for i in range(i, len(samples) - 1):
190190
sys.exit(1)
191191

192192
if new_v_ipc == 0:
193-
print("line %d: decel phase over" % i)
193+
# print("line %d: decel phase over" % i)
194194
break
195195

196196
old_v_ipc = new_v_ipc
@@ -201,15 +201,15 @@ if abs(max_acceleration_ipspc + (highest_seen_accel_ipc2 * cycles_per_second)) >
201201
print("error: max accel is %.6f i/s^2" % max_acceleration_ips2)
202202
sys.exit(1)
203203

204-
print(" decel reached but did not exceed 1/2 of max accel of %.6f i/s^2" % max_acceleration_ips2)
204+
#print(" decel reached but did not exceed 1/2 of max accel of %.6f i/s^2" % max_acceleration_ips2)
205205

206206

207207
# verify X stopped at 1.000000
208208
if samples[i][1] != 1.000000:
209209
print("error: line %d: X stopped at %.6f, not at 1.000000!" % (i, samples[i][1]))
210210
sys.exit(1)
211211

212-
print(" X reached target of 1.0000")
212+
#print(" X reached target of 1.0000")
213213

214214

215215
# verify X doesn't move from now on
@@ -219,9 +219,8 @@ for i in range(i, len(samples) - 1):
219219
sys.exit(1)
220220

221221

222-
print("line %d: X did not move after reaching target" % i)
222+
#print("line %d: X did not move after reaching target" % i)
223223

224-
print("success!\n")
225224
sys.exit(0)
226225

227226

0 commit comments

Comments
 (0)