You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm using ONE firmware for a bunch of different boards. Some have a display connected, some not.
Because of initialising the display pins in the class constructor i have some unwanted behavior on boards with
no displays. Some boards have pwm dimmers connected where others have a display for example.
After a reset they are flashing at 100 percent in this case.
It should be possible in c++ to create a nullptr class instance and doing the initialization later in the setup function for example.
But i had no success trying this.
So my workaround for this problem is to remove all IO functions from the constructor and put them in the init() function
right after if (_booted).
Is there a more elegant way to solve this?
Best
Martin
The text was updated successfully, but these errors were encountered:
Hello,
i'm using ONE firmware for a bunch of different boards. Some have a display connected, some not.
Because of initialising the display pins in the class constructor i have some unwanted behavior on boards with
no displays. Some boards have pwm dimmers connected where others have a display for example.
After a reset they are flashing at 100 percent in this case.
It should be possible in c++ to create a nullptr class instance and doing the initialization later in the setup function for example.
But i had no success trying this.
So my workaround for this problem is to remove all IO functions from the constructor and put them in the init() function
right after if (_booted).
Is there a more elegant way to solve this?
Best
Martin
The text was updated successfully, but these errors were encountered: