From the code snippet, it looks like you are using our Simple3piMazeSolver sketch example from our AVR Library. Can you be more specific about how you want to manually calibrate your 3pi robot’s sensors?
Depending on the rules of your competition, you could bring a sample course with you to the competition and calibrate the 3pi on it there. Then, without turning the 3pi off, run it on the actual course by pressing the ‘B’ button. This way you do not have to make any modifications to the example code. If you are not allowed to bring a sample course, you could store the calibration results in EEPROM then read the calibration data from EEPROM during the competition. You might find the code in this post useful.