support compass callback for unit test.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
update document.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>