Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ABI] special ID to DISABLE callback #1260

Merged
merged 2 commits into from
Jul 25, 2015
Merged

[ABI] special ID to DISABLE callback #1260

merged 2 commits into from
Jul 25, 2015

Conversation

flixr
Copy link
Member

@flixr flixr commented Jul 24, 2015

  • change ABI_BROADCAST from 0 to 255
  • add ABI_DISABLE with id 0
  • separate ABI IDs for binding mag message

This makes it easier to explictitly not use an ABI binding by only defining the ID to ABI_DISABLE (zero) without further change of the code.
The idea is that you can use it to e.g. disable a mag callback for one AHRS without globally setting USE_MAGNETOMETER to FALSE.
Also make it easy to use a different mag than the one on the IMU.
However the mag still has to have the same alignment as the IMU (still same BODY_TO_IMU used).

This makes it easier to explictitly not use an ABI binding by only defining the ID to ABI_DISABLE (zero) without further change of the code.
The idea is that you can use it to e.g. disable a mag callback for one AHRS without globally setting USE_MAGNETOMETER to FALSE.
@flixr flixr added the Airborne label Jul 24, 2015
This makes it easy to use a different mag than the one on the IMU, or to disable the mag callback alltogether.
However the mag still has to have the same alignment as the IMU (still same BODY_TO_IMU used).

Towards solving #197
@gautierhattenberger
Copy link
Member

I think it is a good idea.

flixr added a commit that referenced this pull request Jul 25, 2015
[ABI] special ID to DISABLE callback

- change ABI_BROADCAST from 0 to 255
- add ABI_DISABLE with id 0
- separate ABI IDs for binding mag message

This makes it easier to explictitly not use an ABI binding by only defining the ID to ABI_DISABLE (zero) without further change of the code.
The idea is that you can use it to e.g. disable a mag callback for one AHRS without globally setting USE_MAGNETOMETER to FALSE.   
Also make it easy to use a different mag than the one on the IMU.
However the mag still has to have the same alignment as the IMU (still same BODY_TO_IMU used).
@flixr flixr merged commit 0e94762 into master Jul 25, 2015
@flixr flixr deleted the abi_ids branch July 25, 2015 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants