Skip to content

Commit 94cdadf

Browse files
authored
Bug fixes and Example Updates (#5)
* update gitignore * example fix: properly display move done feedback and handle alerts * example fix: change 3rd party stepper examples to use CLOCK_RATE_LOW * example fix: update delays in mc/sd programs to ensure the move is done before commanding the next * bug: fix issue for users with a space in their computer username * update submodule to ClearCore Library * add release 1.7.0
1 parent 170f763 commit 94cdadf

File tree

17 files changed

+77
-58
lines changed

17 files changed

+77
-58
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ drivers/verifyinf.cmd
3838
*.zip
3939
*.componentinfo.xml
4040
jlink.*
41+
.vscode/

Teknic

Submodule Teknic updated 213 files

keywords.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -568,16 +568,6 @@ MOTOR_M0M1 LITERAL1
568568
MOTOR_M2M3 LITERAL1
569569
MOTOR_MOVING LITERAL1
570570
MOTOR_READY LITERAL1
571-
MOVE_TARGET_ABSOLUTE LITERAL1
572-
MOVE_TARGET_REL_END_POSN LITERAL1
573-
MS_ACCEL LITERAL1
574-
MS_CHANGE_DIR LITERAL1
575-
MS_CRUISE LITERAL1
576-
MS_DECEL LITERAL1
577-
MS_DECEL_VEL LITERAL1
578-
MS_END LITERAL1
579-
MS_IDLE LITERAL1
580-
MS_START LITERAL1
581571
NONE LITERAL1
582572
NUM_MOTOR_PAIRS LITERAL1
583573
NVM_LOC_DAC_SPAN LITERAL1

libraries/ClearPathModeExamples/ClearPath-MC Series/FollowDigitalTorque/FollowDigitalTorque.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ bool CommandTorque(int commandedTorque) {
154154
motor.MotorInAState(false);
155155
}
156156

157-
// Ensures this delay is at least 2ms longer than the Input A filter
157+
// Ensures this delay is at least 20ms longer than the Input A filter
158158
// setting in MSP
159-
delay(2 + INPUT_A_FILTER);
159+
delay(20 + INPUT_A_FILTER);
160160

161161
// Command the move
162162
motor.MotorInBDuty(dutyRequest);

libraries/ClearPathModeExamples/ClearPath-MC Series/FollowDigitalVelocity/FollowDigitalVelocity.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ bool CommandVelocity(long commandedVelocity) {
138138
motor.MotorInAState(true);
139139
}
140140
// Delays to send the correct filtered direction.
141-
delay(2 + INPUT_A_FILTER);
141+
delay(20 + INPUT_A_FILTER);
142142

143143
// Find the scaling factor of our velocity range mapped to the PWM duty
144144
// cycle range (255 is the max duty cycle).

libraries/ClearPathModeExamples/ClearPath-MC Series/MoveAbsolutePosition/Abs16PositionsHomeToHardStop/Abs16PositionsHomeToHardStop.ino

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,10 @@ bool MoveToPosition(int positionNum) {
202202
else {
203203
// If an invalid positionNum has been entered, returns a failure
204204
return false;
205-
}
206-
207-
// Ensures this delay is at least 2ms longer than the Input A, B filter
208-
// setting in MSP
209-
delay(1);
205+
}
210206

211207
// Waits for HLFB to assert (signaling the move has successfully completed)
208+
delay(2);
212209
Serial.println("Moving.. Waiting for HLFB");
213210
while (motor.HlfbState() != MotorDriver::HLFB_ASSERTED &&
214211
!motor.StatusReg().bit.MotorInFault) {

libraries/ClearPathModeExamples/ClearPath-MC Series/MoveAbsolutePosition/Abs2PositionsHomeToSwitch/Abs2PositionsHomeToSwitch.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ bool MoveToPosition(int positionNum) {
190190
return false;
191191
}
192192

193-
// Ensures this delay is at least 2ms longer than the Input A, B filter
193+
// Ensures this delay is at least 20ms longer than the Input A, B filter
194194
// setting in MSP
195-
delay(2 + INPUT_A_B_FILTER);
195+
delay(20 + INPUT_A_B_FILTER);
196196

197197
// Waits for HLFB to assert (signaling the move has successfully completed)
198198
Serial.println("Moving.. Waiting for HLFB");

libraries/ClearPathModeExamples/ClearPath-MC Series/MoveAbsolutePosition/Abs4PositionsHomeToHardStop/Abs4PositionsHomeToHardStop.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ bool MoveToPosition(int positionNum) {
209209
return false;
210210
}
211211

212-
// Ensures this delay is at least 2ms longer than the Input A, B filter
212+
// Ensures this delay is at least 20ms longer than the Input A, B filter
213213
// setting in MSP
214-
delay(2 + INPUT_A_B_FILTER);
214+
delay(20 + INPUT_A_B_FILTER);
215215

216216
// Waits for HLFB to assert (signaling the move has successfully completed)
217217
Serial.println("Moving.. Waiting for HLFB");

libraries/ClearPathModeExamples/ClearPath-MC Series/MoveIncrementalDistance/Move2IncrementsHomeToSwitch/Move2IncrementsHomeToSwitch.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ bool MoveIncrements(int numberOfIncrements, int positionIncrement) {
231231
return false;
232232
}
233233

234-
// Delays for 2ms longer than the Input A, B filter setting in MSP
235-
delay(2 + INPUT_A_B_FILTER);
234+
// Delays for 20ms longer than the Input A, B filter setting in MSP
235+
delay(20 + INPUT_A_B_FILTER);
236236

237237
// Sends trigger pulses to the motor
238238
motor.EnableTriggerPulse(numberOfIncrements, TRIGGER_PULSE_TIME, true);

libraries/ClearPathModeExamples/ClearPath-MC Series/MoveIncrementalDistance/Move4IncrementsHomeToHardStop/Move4IncrementsHomeToHardStop.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ bool MoveIncrements(int numberOfIncrements, int positionIncrement) {
232232
return false;
233233
}
234234

235-
// Delays 2ms longer than the Input A, B filter setting in MSP
236-
delay(2 + INPUT_A_B_FILTER);
235+
// Delays 20ms longer than the Input A, B filter setting in MSP
236+
delay(20 + INPUT_A_B_FILTER);
237237

238238
// Sends trigger pulses to the motor
239239
motor.EnableTriggerPulse(numberOfIncrements, TRIGGER_PULSE_TIME, true);

0 commit comments

Comments
 (0)