Skip to content

Update OpenFIREcommon.cpp - assign OLED.display pointer to nullptr#135

Merged
SeongGino merged 1 commit intoTeamOpenFIRE:OpenFIRE-devfrom
alessandro-satanassi:OpenFIRE-dev
Nov 23, 2025
Merged

Update OpenFIREcommon.cpp - assign OLED.display pointer to nullptr#135
SeongGino merged 1 commit intoTeamOpenFIRE:OpenFIRE-devfrom
alessandro-satanassi:OpenFIRE-dev

Conversation

@alessandro-satanassi
Copy link
Contributor

@alessandro-satanassi alessandro-satanassi commented Nov 22, 2025

By assigning the OLED.display pointer to nullptr, the program works and the micro doesn't crash, even if the OLED display is not connected even if the pins are configured.
...
This probably solves the problem you describe in OpenFIREdisplay.cpp on line 29 " // TODO: for some reason, doing this AFTER saving updated pins settings (even when doing it from defaults and there's no default mappings for peripheral pins)
// causes the board to hang. Even though this is all correct (and any display objects should get deleted from the above, so don't think it can be a new object thing)...
"

By assigning the OLED.display pointer to nullptr, the program works and the micro doesn't crash, even if the OLED display is not connected even if the pins are configured.
Copy link
Member

@SeongGino SeongGino left a comment

Choose a reason for hiding this comment

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

Right, cleanup is hard.

@SeongGino SeongGino merged commit 4e7fbe8 into TeamOpenFIRE:OpenFIRE-dev Nov 23, 2025
11 checks passed
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.

2 participants