motion: Fix state tag truncation and replace float with double#4020
motion: Fix state tag truncation and replace float with double#4020BsAtHome wants to merge 1 commit into
Conversation
|
Need to take care here. What about changes to emcmot_hal_data->interp_feedrate? Which leads me to suggest another change to resolve the active_tags mess this touches which I was leaving unitil #3995 was committed. |
|
The name The name "float" is used many places in linuxCNC, but most float types were promoted to double because you need the precision in the calculation. The variable names and defined did not change, only the underlying type. |
The state tag is used in communication between interpreter and motion. Data put into it usually comes from double sized types and got truncated to float size. Afterwards, the values would, for example, be moved to HAL pins and the truncated value would be extended to double again. This is obviously a bad plan.
This PR makes the state tag field_float of double type.