In this video I fit all the electronics needed for the battery mod under the factory cap. I use an ATTINY85 AVR microcontroller as the brain.
I also test the flight time with some other cells in the battery pack.
The changed code for the ATTINY is available here:
https://drive.google.com/drive/folders/1kk2MK31aKy3-geZ1nAV_AzLLISR100wc?usp=sharing
ENJOY!