Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DriverStation::IsNewControlData is incorrect #233

Closed
virtuald opened this issue Sep 14, 2016 · 2 comments
Closed

DriverStation::IsNewControlData is incorrect #233

virtuald opened this issue Sep 14, 2016 · 2 comments
Milestone

Comments

@virtuald
Copy link
Member

Current C++ implementation is:

bool DriverStation::IsNewControlData() const {
    return m_newControlData.tryTake() == false;
}

This is correct IFF you are calling it a lot and never forget to call it. But really, it's just a bad way of doing this. The Java implementation is actually correct.

@ThadHouse
Copy link
Member

I believe #187 fixes this issue. I realized that there were some other issues as well with using a semaphore, so that PR uses an atomic bool in C++ and Java.

@PeterJohnson
Copy link
Member

Closed with #187.

PeterJohnson added a commit that referenced this issue Apr 28, 2018
These allow saving and loading non-persistent entries in the persistent
file format.
pjbuterbaugh pushed a commit to pjbuterbaugh/allwpilib that referenced this issue Jun 15, 2023
* Fixed Java code examples

* fixed indents

* fixed indent

* fixed bracket placement

* fixed indents

* readded bracket to cpp example

* Update C++ code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants