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

GitHub docs updates #22

Merged
merged 9 commits into from
Jun 26, 2017
Merged

GitHub docs updates #22

merged 9 commits into from
Jun 26, 2017

Conversation

HotelCalifornia
Copy link
Contributor

Add information about our various repositories in the contribution guidelines.
These can be basically dropped in to the same file in our other repositories.

Seeking input on my examples of issues that should be opened in each repo, as I think they're a little lame.

@edjubuh edjubuh changed the title Update contribution guidelines GitHub docs updates Jun 24, 2017
@edjubuh edjubuh self-requested a review June 24, 2017 02:44
Copy link
Member

@edjubuh edjubuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HotelCalifornia feel free to squash commit this when all the changes are done

@HotelCalifornia HotelCalifornia merged commit aea041e into master Jun 26, 2017
@edjubuh edjubuh deleted the contributing-update branch June 26, 2017 16:34
HotelCalifornia pushed a commit that referenced this pull request Jun 11, 2019
  - Changed port number validation to return ENXIO when outside the domain of port numbers
  - Changed port validation to return ENODEV when the requested device doesn't match the actual device
  - Vision Sensor read/get functions consistently use EAGAIN when the libv5rts tells us it couldn't get data
  - Remove docstrings for EACCES since it is practically impossible to get that errno (we wait for mutex indefinitely)
  - vision_get_by_sig consistently sets errno to EDOM when unable to find objects that match (valid) arguments

Right now, our returned errnos aren't that great.

Close #117

- [X] When objects are in vision sensors FOV, but none are of a particular signature, signature ID is correct and EDOM is errno

```cpp
errno = 0; // set to 0 to make sure errno is being set properly... normally wouldn't do this
// errno was 33 b/c there were no objects to see of signature 1
pros::lcd::print(1, "%d (%d)", vision.get_by_sig(0, 1).signature, errno);
errno = 0;
// errno was 0 b/c it worked fine
pros::lcd::print(2, "%d (%d)", vision.get_by_sig(0, 2).signature, errno);
errno = 0;
// errno was flickered between 0/33 b/c there were sometimes objects of 2 to see
pros::lcd::print(3, "%d (%d)", vision.get_by_sig(2, 2).signature, errno);
errno = 0;
// errno was EINVAL (22) because 8 is an invalid signature id
pros::lcd::print(4, "%d (%d)", vision.get_by_sig(8, 2).signature, errno);
errno = 0;
// errno was EADDRINUSE (112) b/c there was a radio plugged in
pros::lcd::print(5, "%d (%d)", pros::c::vision_get_by_sig(21, 0, 1).signature, errno);
errno = 0;
// errno was ENXIO (6) b/c there's no smart port #22
pros::lcd::print(6, "%d (%d)", pros::c::vision_get_by_sig(22, 0, 1).signature, errno);
// errno was ENODEV (19) b/c there's no motor plugged into 2 (or anything for that matter)
errno = 0;
pros::lcd::print(7, "%d (%d)", pros::c::motor_get_voltage(2), errno);
```
HotelCalifornia pushed a commit that referenced this pull request Jun 11, 2019
Summary
  - Changed port number validation to return ENXIO when outside the domain of port numbers
  - Changed port validation to return ENODEV when the requested device doesn't match the actual device
  - Vision Sensor read/get functions consistently use EAGAIN when the libv5rts tells us it couldn't get data
  - Remove docstrings for EACCES since it is practically impossible to get that errno (we wait for mutex indefinitely)
  - vision_get_by_sig consistently sets errno to EDOM when unable to find objects that match (valid) arguments

Right now, our returned errnos aren't that great.

Close #117

- [X] When objects are in vision sensors FOV, but none are of a particular signature, signature ID is correct and EDOM is errno

```cpp
errno = 0; // set to 0 to make sure errno is being set properly... normally wouldn't do this
// errno was 33 b/c there were no objects to see of signature 1
pros::lcd::print(1, "%d (%d)", vision.get_by_sig(0, 1).signature, errno);
errno = 0;
// errno was 0 b/c it worked fine
pros::lcd::print(2, "%d (%d)", vision.get_by_sig(0, 2).signature, errno);
errno = 0;
// errno was flickered between 0/33 b/c there were sometimes objects of 2 to see
pros::lcd::print(3, "%d (%d)", vision.get_by_sig(2, 2).signature, errno);
errno = 0;
// errno was EINVAL (22) because 8 is an invalid signature id
pros::lcd::print(4, "%d (%d)", vision.get_by_sig(8, 2).signature, errno);
errno = 0;
// errno was EADDRINUSE (112) b/c there was a radio plugged in
pros::lcd::print(5, "%d (%d)", pros::c::vision_get_by_sig(21, 0, 1).signature, errno);
errno = 0;
// errno was ENXIO (6) b/c there's no smart port #22
pros::lcd::print(6, "%d (%d)", pros::c::vision_get_by_sig(22, 0, 1).signature, errno);
// errno was ENODEV (19) b/c there's no motor plugged into 2 (or anything for that matter)
errno = 0;
pros::lcd::print(7, "%d (%d)", pros::c::motor_get_voltage(2), errno);
```
HotelCalifornia pushed a commit that referenced this pull request Jun 12, 2019
Summary
  - Changed port number validation to return ENXIO when outside the domain of port numbers
  - Changed port validation to return ENODEV when the requested device doesn't match the actual device
  - Vision Sensor read/get functions consistently use EAGAIN when the libv5rts tells us it couldn't get data
  - Remove docstrings for EACCES since it is practically impossible to get that errno (we wait for mutex indefinitely)
  - vision_get_by_sig consistently sets errno to EDOM when unable to find objects that match (valid) arguments

Right now, our returned errnos aren't that great.

Close #117

- [X] When objects are in vision sensors FOV, but none are of a particular signature, signature ID is correct and EDOM is errno

```cpp
errno = 0; // set to 0 to make sure errno is being set properly... normally wouldn't do this
// errno was 33 b/c there were no objects to see of signature 1
pros::lcd::print(1, "%d (%d)", vision.get_by_sig(0, 1).signature, errno);
errno = 0;
// errno was 0 b/c it worked fine
pros::lcd::print(2, "%d (%d)", vision.get_by_sig(0, 2).signature, errno);
errno = 0;
// errno was flickered between 0/33 b/c there were sometimes objects of 2 to see
pros::lcd::print(3, "%d (%d)", vision.get_by_sig(2, 2).signature, errno);
errno = 0;
// errno was EINVAL (22) because 8 is an invalid signature id
pros::lcd::print(4, "%d (%d)", vision.get_by_sig(8, 2).signature, errno);
errno = 0;
// errno was EADDRINUSE (112) b/c there was a radio plugged in
pros::lcd::print(5, "%d (%d)", pros::c::vision_get_by_sig(21, 0, 1).signature, errno);
errno = 0;
// errno was ENXIO (6) b/c there's no smart port #22
pros::lcd::print(6, "%d (%d)", pros::c::vision_get_by_sig(22, 0, 1).signature, errno);
// errno was ENODEV (19) b/c there's no motor plugged into 2 (or anything for that matter)
errno = 0;
pros::lcd::print(7, "%d (%d)", pros::c::motor_get_voltage(2), errno);
```
HotelCalifornia pushed a commit that referenced this pull request Jun 12, 2019
Summary
  - Changed port number validation to return ENXIO when outside the domain of port numbers
  - Changed port validation to return ENODEV when the requested device doesn't match the actual device
  - Vision Sensor read/get functions consistently use EAGAIN when the libv5rts tells us it couldn't get data
  - Remove docstrings for EACCES since it is practically impossible to get that errno (we wait for mutex indefinitely)
  - vision_get_by_sig consistently sets errno to EDOM when unable to find objects that match (valid) arguments

Right now, our returned errnos aren't that great.

Close #117

- [X] When objects are in vision sensors FOV, but none are of a particular signature, signature ID is correct and EDOM is errno

```cpp
errno = 0; // set to 0 to make sure errno is being set properly... normally wouldn't do this
// errno was 33 b/c there were no objects to see of signature 1
pros::lcd::print(1, "%d (%d)", vision.get_by_sig(0, 1).signature, errno);
errno = 0;
// errno was 0 b/c it worked fine
pros::lcd::print(2, "%d (%d)", vision.get_by_sig(0, 2).signature, errno);
errno = 0;
// errno was flickered between 0/33 b/c there were sometimes objects of 2 to see
pros::lcd::print(3, "%d (%d)", vision.get_by_sig(2, 2).signature, errno);
errno = 0;
// errno was EINVAL (22) because 8 is an invalid signature id
pros::lcd::print(4, "%d (%d)", vision.get_by_sig(8, 2).signature, errno);
errno = 0;
// errno was EADDRINUSE (112) b/c there was a radio plugged in
pros::lcd::print(5, "%d (%d)", pros::c::vision_get_by_sig(21, 0, 1).signature, errno);
errno = 0;
// errno was ENXIO (6) b/c there's no smart port #22
pros::lcd::print(6, "%d (%d)", pros::c::vision_get_by_sig(22, 0, 1).signature, errno);
// errno was ENODEV (19) b/c there's no motor plugged into 2 (or anything for that matter)
errno = 0;
pros::lcd::print(7, "%d (%d)", pros::c::motor_get_voltage(2), errno);
```
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

Successfully merging this pull request may close these issues.

2 participants