So there’s an issue occurring when a team I’m mentoring is using their pneumatics. The digital_out is defined globally along with all the other devices. However when the program starts, it immediately gives a memory permission error. I traced this to the line of code where we define that endgame variable. This behavior does not occur when we defined the endgame variable in separate scopes in autonomous and usercontrol. Is there a reason for this?
I assume the usual problem, you are using Brain.ThreeWirePort before it has been created.
many topics about this.
3 Likes
Seeing as this happens quite often, is there any chance the vexcode linter might be able to show a warning about this, and/or have a message pop up on the brain screen rather than segfaulting?
7 Likes
VEXcode V5 Pro uses clangd for intellisense, I don’t think it’s possible for analysis to extend to understanding these types of problems. The VS Code extension leaves the choice of language analysis up to the end user.
4 Likes
In theory you could just change the default robot-config.cpp filename to aaaaaaaarobot-config.cpp, but somehow that seems a bit inelegant.