diff options
author | Jean-François Milants <jf@codingfield.com> | 2021-06-12 10:58:28 +0200 |
---|---|---|
committer | Jean-François Milants <jf@codingfield.com> | 2021-06-12 10:58:28 +0200 |
commit | 6d524ebea2c97e309633d5e01c3a1e37c182f27d (patch) | |
tree | 3f9c7f96f0fab64f581035c72480596a4cc4db43 /src/main.cpp | |
parent | b1925ff28638dd4b8400c4d0c49d796d8990b1af (diff) |
Move most of the code from the constructor of the objects statically initialized in main() into Start()/Init() functions to avoid Static Initialization Order Fiasco (https://en.cppreference.com/w/cpp/language/siof). See https://github.com/JF002/InfiniTime/pull/415#issuecomment-859004238.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 52ec9580..4c2c5de8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -306,6 +306,8 @@ int main(void) { debounceTimer = xTimerCreate("debounceTimer", 200, pdFALSE, (void*) 0, DebounceTimerCallback); debounceChargeTimer = xTimerCreate("debounceTimerCharge", 200, pdFALSE, (void*) 0, DebounceTimerChargeCallback); + lvgl.Init(); + systemTask.Start(); nimble_port_init(); |