damaki / DW1000

A SPARK/Ada driver for the DecaWave DW1000 Ultra-Wideband tranceiver.
MIT License
13 stars 5 forks source link

Fix 2 proof warnings. #7

Closed damaki closed 5 years ago

damaki commented 5 years ago

This refactors a line in the Receive_Signal_Power function to help GNATprove prove the precondition to Log10.

We also suppress a warning around the DW1000_IRQ's Attach_Interrupt where a warning is issued about the possibility of a reserved interrupt. Since there's no way to prove that it's not reserved, or to somehow restrict the choice, we simply suppress the message instead and assume that the interrupt is not reserved. A reserved interrupt should be easy to spot since it will raise a Program_Error when attaching it, which would be hard to miss.