When I remove the declaration for ChassisMotionController, it works fine (I’m not actually referencing it anywhere yet), but with the AsyncMotionProfileController, it gets stuck on a black screen, not even entering initialize, where my lvgl menus are created. Has anyone else experienced this issue?
This happens when something throws an exception when begin constructed in global scope. We can’t show exceptions in this case, so you get the behavior you see. Set ChassisMotionController in initialize instead of using a global builder to see what exception it’s throwing (It’ll be printed to the console and the screen on the latest kernel version).
For this exact reason. If building the object throws or segfaults, PROS can’t help you see why (because it happened before PROS could set up the stuff that helps you see why). Additionally, constructing these objects globally makes it much harder to configure logging if you need to debug something down the line.
In general, global objects are evil - you have little to no control over their construction and destruction order, so when you have a complex system with interdependent subsystems, you’ve got no guarantees which systems are up at what point in time.