This commit is contained in:
matt
2021-02-07 09:41:00 +08:00
parent 85632dce48
commit 6fc2ab8127
+18 -8
View File
@@ -112,6 +112,24 @@ void hal_3axis_magn_Outputs_wrapper(HAL_magn_mG_t *magn,
case 1:
if (magn_inited[1])
{
#ifdef HAL_IMPL
if (cps_ist8310.success)
{
magn->x = cps_ist8310.field[0];
magn->y = cps_ist8310.field[1];
magn->z = cps_ist8310.field[2];
magn->seq = cps_ist8310.sample_count;
ErrorCode[0] = 0;
}
else
ErrorCode[0] = -1;
#endif
}
break;
case 2:
if (magn_inited[2])
{
#ifdef HAL_IMPL
if (cps_ist8310_ext.success)
{
@@ -124,14 +142,6 @@ void hal_3axis_magn_Outputs_wrapper(HAL_magn_mG_t *magn,
}
else
ErrorCode[0] = -1;
#endif
}
break;
case 2:
if (magn_inited[2])
{
#ifdef HAL_IMPL
ErrorCode[0] = -1;
#endif
}
break;