Throttle issue

I’m having a weird issue with the throttle, that I’m not even sure I can describe in an uderstandable manner.
The thing is that when holding the throttle down (for example for arming), I need to raise it for a while afterwards in order to get any response from it. It is as if its value has no lower end and it drops and drops, and needs to be raised again until it enters working range.
I can see it in the remote itself, so I believe it’s an QGC thing that has nothing to do with the drone’s flight control.

Edit 1:
Video of the issue:

Edit 2:
I’m actually thinking that thwhat causes this issue is row 456 from
throttle_accu += throttle*(40/1000.f); //for throttle to change from min to max it will take 1000ms (40ms is a loop time)
However I’m still struggling to compile and run edited version of this (I believe the issue can be fixed with different values here - for example something like 40/4000.f). Is there a documented build procedure for the QGC?