Avoid obstacles detect to 0,5m

Hello,
I have a TFmini plus, how introduce the distance to 0,5m for keep the distance between the drone and the wall? ( for take a pictures)
Thank you so much for your support