How do I calibrate the firmware after building the board?
To calibrate, you would need to enable the debug information in the firmware. In 'ec.c', 'ec.h', and 'minne_topre.c' you uncomment the marked lines and in info.json (might be keyboard.json now but haven't checked the names in QMK source in a while) you need to enable the console. From there you then build and flash it to the PCB. Using the QMK Toolbox console you would take the values at rest and pressed for each key (best to hold a switch for multiple seconds to let the matrix print a few times) and adjust from there. Most of the time you just need to adjust the default values for the full board (done in a single location) based off the average of all the switches. In some situations, like for the two outside switches on the bottom row, you will have to edit the values in the switch statement at the bottom of 'ec.c'. For reset and actuation you always want reset to be lower than actuation by at least 5, but it is best to be closer to 10 which is not possible in all situations.
It is a bit involved but writing an auto-calibrate function is well beyond my skill set. Cipulot is working on writing one for the OSAv2 firmware so maybe once that is done it can be made to work on this but that has an unknown timeline as he first started doing the OSAv2's back in april of this year. That seems to have proven more difficult than initially expected so that is a "will see" type of thing unfortunately.