Skip to content

Conversation

@tyeth
Copy link
Member

@tyeth tyeth commented Nov 19, 2025

Initialize config_a to NULL in the Adafruit_LIS2MDL class.

@tyeth tyeth requested a review from brentru November 19, 2025 14:49

int32_t _sensorID;
Adafruit_BusIO_Register *config_a;
Adafruit_BusIO_Register *config_a = NULL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a pointer, please change to nullptr

Comment on lines 121 to 122
Adafruit_I2CDevice *i2c_dev = NULL;
Adafruit_SPIDevice *spi_dev = NULL;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update these too probably

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, use nullptr throughout this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants