support external compass
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
/* %%%-SFUNWIZ_wrapper_includes_Changes_BEGIN --- EDIT HERE TO _END */
|
/* %%%-SFUNWIZ_wrapper_includes_Changes_BEGIN --- EDIT HERE TO _END */
|
||||||
#ifdef HAL_IMPL
|
#ifdef HAL_IMPL
|
||||||
#include "spi_devs.h"
|
#include "spi_devs.h"
|
||||||
|
#include "i2c_devs.h"
|
||||||
#endif
|
#endif
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
/* %%%-SFUNWIZ_wrapper_includes_Changes_END --- EDIT HERE TO _BEGIN */
|
/* %%%-SFUNWIZ_wrapper_includes_Changes_END --- EDIT HERE TO _BEGIN */
|
||||||
@@ -112,7 +113,17 @@ void hal_3axis_magn_Outputs_wrapper(HAL_magn_mG_t *magn,
|
|||||||
if (magn_inited[1])
|
if (magn_inited[1])
|
||||||
{
|
{
|
||||||
#ifdef HAL_IMPL
|
#ifdef HAL_IMPL
|
||||||
ErrorCode[0] = -1;
|
if (cps_ist8310_ext.success)
|
||||||
|
{
|
||||||
|
magn->x = cps_ist8310_ext.field[0];
|
||||||
|
magn->y = cps_ist8310_ext.field[1];
|
||||||
|
magn->z = cps_ist8310_ext.field[2];
|
||||||
|
magn->seq = cps_ist8310_ext.sample_count;
|
||||||
|
|
||||||
|
ErrorCode[0] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ErrorCode[0] = -1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user