Stabilization in multicopter reversed

I’m making my own drone.

When the multicopter is in stabilization mode, posture recovery reacts in the opposite direction.

For example, when a multicopter is pitch-up, it has to react to pitch-down, but it wants to go up further.

All feedback on the roll, pitch, and yaw moves in reverse.

All the commands I input with the controls are normally entered.
After entering the roll to the left, the multicopter has to roll to the left and then return to normal, but instead, it appears to be turning to the left.

What should I do to make the multicopter react normally?