Please help me with this loop time limit

Hello everyone. i am here with another problem again :). I’m new to coding so I need some help. I got this code off of github for a rocket Thrust Vector Control system. I tried it on the TVC mount and servos I 3-d printed and it works perfcectly fine. Just somewhere in the code, it seems like it commands themain program loop to stop after running for a few seconds. I want the main program loop to go on till the arduino has no battery power left (literally) but do not have the knowledge yet to fix it. ( total noob at coding) Thank you for any help!

https://create.arduino.cc/editor/CFUYukon/59a93f09-6ff4-453c-8939-43236cc00d4a/preview

I tried to post the full code here, but exceeds the limit. so here is a link to the sketch
also ino. file

Rocketmotor_PID_update.ino (15 KB)

If the program is long you can add the .ino file as an attachment.

...R