Just as a follow up, as you seem to have it mostly working.
Looking at the compile result of 'el8_homecomp.comp' (ie 'el8_homecomp.c') I see this 'do_homing' function:
Code:
bool do_homing(void)
{
int joint_num;
int homing_flag = 0;
bool beginning_allhomed = get_allhomed();
do_homing_sequence();
/* loop thru joints, treat each one individually */
for (joint_num = 0; joint_num < all_joints; joint_num++) {
if (!H[joint_num].joint_in_sequence) { continue; }
if (!GET_JOINT_ACTIVE_FLAG(&joints[joint_num])) { continue; }
// CUSTOM joint homing state machine for everybody:
homing_flag += custom_1joint_state_machine(joint_num);
}
if ( homing_flag > 0 ) { /* one or more joint is homing */
homing_active = 1;
} else { /* is a homing sequence in progress? */
if (sequence_state == HOME_SEQUENCE_IDLE) {
/* no, single joint only, we're done */
homing_active = 0;
}
}
// return 1 if homing completed this period
if (!beginning_allhomed && get_allhomed()) {homing_active=0; return 1;}
return 0;
}
While in my test component I get this:
Code:
bool do_homing(void)
{
int joint_num;
int homing_flag = 0;
bool beginning_allhomed = get_allhomed();
do_homing_sequence();
/* loop thru joints, treat each one individually */
for (joint_num = 0; joint_num < all_joints; joint_num++) {
if (!H[joint_num].joint_in_sequence) { continue; }
if (!GET_JOINT_ACTIVE_FLAG(&joints[joint_num])) { continue; }
if (customH[joint_num].is_custom_homing) {
// CUSTOM joint homing state machine:
homing_flag += custom_1joint_state_machine(joint_num);
} else {
// DEFAULT joint homing state machine:
homing_flag += base_1joint_state_machine(joint_num);
}
}
if ( homing_flag > 0 ) { /* one or more joint is homing */
homing_active = 1;
} else { /* is a homing sequence in progress? */
if (sequence_state == HOME_SEQUENCE_IDLE) {
/* no, single joint only, we're done */
homing_active = 0;
}
}
// return 1 if homing completed this period
if (!beginning_allhomed && get_allhomed()) {homing_active=0; return 1;}
return 0;
}
So the 'el8_homecomp.c' does not contain the switch between CUSTOM and DEFAULT homing:
Code:
if (customH[joint_num].is_custom_homing) {
// CUSTOM joint homing state machine:
homing_flag += custom_1joint_state_machine(joint_num);
} else {
// DEFAULT joint homing state machine:
homing_flag += base_1joint_state_machine(joint_num);
}
Looks like it was maybe not intended for the user to be able to choose between the homing method.