Marlin 3D printer firmware supplied with flsun "Kossel Delta" printer from AliExpress. With modifications: added menu item with "Manual Z Calibration" function so the fw does all the moves and calculation, user just need to set correct level with encoder at each meausrement point.
Just a tryout "Am I able to write this kind of stuff". For a production version, go grab latest Marlin FW - it already has it