I'd like to find who was Senior Naval Officer stationed in Freetown in 1840?

I am researching the West Africa Squadron and need to find out who was senior Naval Officer at Freetown in 1840. I know Commander Joseph Denman was appointed senior Officer of the Division from Cape Verde to Cape Palmas but need to know who his Commanding Officer was.