Add  @tht dB code, returns but what?

I would like to get the dB display of the received signal into mainline
code. I have COPIED @tht's code in but I don't yet understand if the
output is sensible.