Object model to report two decimal places for axes



  • Tested with RRF 3.1.0 and M409 K"move.axes[2].max"
    Currently querying the value for move.axes[2].max reports only one decimal place like 311.3, even if inside the config I set 311.35 for the max value.
    I'd like to use a conditional Gcode for homing the z-axis where I set the maximum based on the config file/object model. Would be nice to get that extra bit of precision.
    Or maybe I am missing something 🙂


  • administrators

    Although the value is displayed to 1 decimal place, it is stored to a greater precision. You can see this if you enter:

    echo move.axes[2].max+0.000001

    However, I will increase the number of decimal places reported for axis minima and maxima by M409 to 2 in release 3.1.1.



  • Great! I'll give it a try. Thank you very much.



  • @dc42 said in Object model to report two decimal places for axes:

    Although the value is displayed to 1 decimal place, it is stored to a greater precision. You can see this if you enter:

    echo move.axes[2].max+0.000001

    However, I will increase the number of decimal places reported for axis minima and maxima by M409 to 2 in release 3.1.1.

    .

    Will the reported accuracy be added across the board?
    I noted some rounding when I was doing that macro to add baby steps to the current trigger height.
    Trigger height in config.g was to 3 decimals as reported when using G30, but when added to baby steps & saved it was 2 decimals.
    Didn’t know you could add how many decimals you want returned, but would be better not to have to.

    EDIT: Realized after posting, that your demo was just forcing the return of a string with that level of decimal places, by addition, not a format parameter denoting number of decimals.
    Where's the face palm emoji?


Log in to reply