Describe the bug
I tried to access a button using "M5StamPLC.BtnA". BtnA was a nullptr, but M5Unfied.BtnA was valid
The reason for the nullptr is the way how "M5StamPLC.BtnA" is initialized.
The static instances of M5StamPlc and M5Unified contain a variable BtnA. In M5Unfied BtnA is assigned to an internal structure, In M5StamPlc BtnA is assigned to M5Unfied.BtnA.
THis is working if the initialisation order is first M5Unified an then M5Stamplc. But this cannot be guaranteed., it depends on the project and compiler.
To reproduce
i used platformio the latest version
m5stack/M5StamPLC@1.1.0
m5stack/M5Unified@0.2.8
Expected behavior
Variable should not be a nullptr
Screenshots
No response
Environment
- OS: Windows 10
- IDE &IDE Version: latest version
- Repository Version:
Additional context
No response
Issue checklist
Describe the bug
I tried to access a button using "M5StamPLC.BtnA". BtnA was a nullptr, but M5Unfied.BtnA was valid
The reason for the nullptr is the way how "M5StamPLC.BtnA" is initialized.
The static instances of M5StamPlc and M5Unified contain a variable BtnA. In M5Unfied BtnA is assigned to an internal structure, In M5StamPlc BtnA is assigned to M5Unfied.BtnA.
THis is working if the initialisation order is first M5Unified an then M5Stamplc. But this cannot be guaranteed., it depends on the project and compiler.
To reproduce
i used platformio the latest version
Expected behavior
Variable should not be a nullptr
Screenshots
No response
Environment
Additional context
No response
Issue checklist