Did I break blocks?

so… i may or may not have completely overloaded blocks to the point where it doesn’t execute everything fully. (apologies in advance for those attempting to figure this out). here’s the code:
we broke blocks (not clickbait).v5blocks (125.0 KB)
the part not working is the forever loop at the bottom of the when started block where i try to print out the temperatures for the motors. i had a point where it would print out, but i tried to fix my formatting on it and now it just will not print out whatsoever, it won’t even clear the screen on the controller.
depending on the outcome of this, @EngineerMike might get to live out his dream of teaching me C…

Oop… Sounds like you overloaded it and made the system slow/Break/Glitch.
I would try to reset it and use less code? Just be aware I just joined, but I think this is how to fix it.

Hope you fix it!

-Starry Teh Cat (Call me Starry!)

code seems ok, I think your “cata load” function may not be working and blocking the temperature display (meaning I checked it with that block disabled and it works)


hmm, weird. it seemed to be working fine when i tested it; the catapult set itself in the position it needed to. I’ve never had any issues with the cata load function beforehand. do you see any specific issues with the cata load function that may be making it go haywire?

This was your original comment.

When I look at code and try and help debug, the biggest issue in determining what’s wrong is that I don’t have your robot, or anything close. So all that can be done is looking at the problem area and “guessing” at what the problem may be and test what can be easily tested. It’s easy to setup a V5 with one motor and a couple of controllers. It’s far harder to setup something like a catapult that also includes a rotation sensor mounted somewhere. The best I can do is comment out code that potentially blocks and see if the non-robot specific code then works. So I don’t know if the cata load function has an issue, all I know is that with it disabled the motor temperatures were displayed on the partner controller.

1 Like

I’ll take a closer look at that tomorrow with them and see if we can’t get it narrowed down from there. Or not, and then they’ll have to learn C.

1 Like

update: we got it fixed! still don’t understand what the issue was, but i just made the temperature reader a message and added it before the cataload function at the end. works just fine now. truly a mystery as to why the cataload function makes it go haywire :person_shrugging:

There was the addition of the 0.02 second wait in the position check loop as well, which could potentially have changed some of the behavior would have shown up.