Skip to content

hal: Update more kinematics to getter/setter. - #4297

Open
BsAtHome wants to merge 1 commit into
LinuxCNC:masterfrom
BsAtHome:halgs_kinematics-2
Open

hal: Update more kinematics to getter/setter.#4297
BsAtHome wants to merge 1 commit into
LinuxCNC:masterfrom
BsAtHome:halgs_kinematics-2

Conversation

@BsAtHome

Copy link
Copy Markdown
Contributor

These should be the last kinematics files to convert to getter/setter.

The set includes the examples userkins.comp and millturn.comp. These have useless pins/params that are part of the example and they are still there.

Apparently also examples, the xyzacb_trsrn.comp and xyzbca_trsrn.comp kinematics were cleaned up a bit. Redundant code was removed, like exporting a function and unused pins/params. The single required pin (for halcompile) is not called dummy. This should have no bearing on the functionality.

The matrixkins.comp is used in a test, so any problem would probably be rather obvious.

// hal parameter examples:
res += hal_param_float_newf(HAL_RW, &haldata->param_rw,comp_id,"%s.param-rw",HAL_PREFIX);
res += hal_param_float_newf(HAL_RO, &haldata->param_ro,comp_id,"%s.param-ro",HAL_PREFIX);
//res += hal_param_new_real(comp_id, HAL_RW, &haldata->param_rw, 0.0, "%s.param-rw", HAL_PREFIX);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: userkins.comp converts these same two example params with hal_param_new_real(), here they are commented out instead. This drops millturn.param-rw and millturn.param-ro from the HAL interface. Intentional, or should they be converted like in userkins?

// The fpin pin is not accessible in kinematics functions.
// Use the *_setup() function for pins and params used by kinematics.
pin out s32 fpin=0"pin to demonstrate use of a conventional (non-kinematics) function fdemo";
pin out si32 dummy=0 "dummy pin to satisfy halcompile";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm intent: this drops the fdemo function and the demo in/out pins (same in xyzbca_trsrn.comp), while userkins.comp keeps its converted fdemo. I found no references to them in docs or configs, so no breakage that I can see. Fine with me if deliberate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants