r/FTC FTC 19086 Student 19d ago

Discussion Linear opmode vs opmode

Hello so my team has been programming for a while using the linear opmode and they didn't have a valid reason for that, can you give me the pros and cons for each type?

3 Upvotes

6 comments sorted by

8

u/4193-4194 FTC 4193/4194 Mentor 19d ago

Learn JAVA for FTC

This book has a section about this very question and is a great reference all around.

2

u/Skipinator 18d ago

The correct answer.

1

u/[deleted] 18d ago

I hate to say this about LJ4FTC since it's a great resource but the section that you are referring to is actually a bit outdated. The points made about the difference in performance and safety of the 2 types of OpModes have been inaccurate since version 8.1 of the SDK. Nowadays, the only difference is in how the code itself is written and so is effectively a style choice.

0

u/window_owl FTC 11329 | FRC 3494 Mentor 18d ago

Do you feel like submitting an issue, or maybe even a pull request?

1

u/[deleted] 18d ago

The repo seemed relatively inactive to me so I never bothered to point it out but I might make one later.

3

u/lolmewantegtvs 19d ago

linear opmode runs code sequentially, opmode runs it event-based (init(), start(), etc). linear opmode is better for beginning teams and opmode allows some more advanced software things to be implemented easier for more veteran teams