Skip to content
Snippets Groups Projects
Commit 448ec494 authored by rahix's avatar rahix
Browse files

revert(bhi160): Re-add hack to fix axis mapping

Originally, commit 1a3dfad3 ("fix(bhi160): Fix interrupt behavior
during initialization") was supposed to fix the BHI160 axis-mapping
issue (see card10/firmware#133) but apparently on some devices it still
needs the original hack to work.  Revert the removal of the axis-mapping
hack from commit 2f56ff36 ("fix(bhi160): Call bhy_mapping_matrix_set
twice for the first time").

Fixes: 1a3dfad3 ("fix(bhi160): Fix interrupt behavior during initialization")
Link: https://git.card10.badge.events.ccc.de/card10/firmware/issues/133


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 421ba7b5
No related branches found
No related tags found
No related merge requests found
......@@ -475,7 +475,16 @@ void vBhi160Task(void *pvParameters)
*/
GPIO_IntConfig(&bhi160_interrupt_pin, GPIO_INT_EDGE, GPIO_INT_RISING);
/* Remap axes to match card10 layout */
/*
* Remap axes to match card10 layout.
*
* TODO: We set the matrix for the accelerometer twice because on some
* badges, the axis mapping is not applied properly the first time. We
* should fix this properly at some point.
*/
bhy_mapping_matrix_set(
PHYSICAL_SENSOR_INDEX_ACC, bhi160_mapping_matrix
);
bhy_mapping_matrix_set(
PHYSICAL_SENSOR_INDEX_ACC, bhi160_mapping_matrix
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment