fixed several bugs

- fixed implementation of mavlink parameter protocol
- fixed ap_param assignment operator
- fixed problems introduced by changing the constrain macro to a function

detailed description:
read to commits' comments