Skip to content

Commit b0ae68d

Browse files
committed
interface fix mag_ext registration
1 parent c264c62 commit b0ae68d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sensor/interface.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ int sensor_interface_register_sensor_mag_ext(uint8_t addr, uint8_t min_burst, ui
6565
case SENSOR_INTERFACE_SPEC_SPI:
6666
if (ext_ssi != NULL)
6767
{
68-
if (burst < ext_ssi->ext_burst)
68+
if (burst > ext_ssi->ext_burst)
6969
{
70-
if (min_burst < ext_ssi->ext_burst)
70+
if (min_burst > ext_ssi->ext_burst)
7171
{
7272
LOG_ERR("Unsupported burst length");
7373
return -1;
7474
}
7575
LOG_WRN("Using minimum burst length");
7676
}
77-
min_ext_burst = min_burst;
77+
min_ext_burst = min_burst; // fallback if num_read exceeds ext_burst
7878
ext_addr = addr;
7979
sensor_interface_dev_spec[SENSOR_INTERFACE_DEV_MAG] = SENSOR_INTERFACE_SPEC_EXT;
8080
return 0;

0 commit comments

Comments
 (0)