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

🔀Release Candidate 3.8.2 #638

Merged
merged 4 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: "\U0001F41B[BUG] - "
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS, Windows, Linux]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for the PROS kernel
title: "✨[FEATURE REQUEST]"
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**What is the behavior that isn't addressed by the existing API?**

**OPTIONAL Describe any solutions you've considered**
A clear and concise description of any solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
85 changes: 85 additions & 0 deletions include/pros/gps.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,91 @@ double gps_get_error(uint8_t port);
*/
gps_status_s_t gps_get_status(uint8_t port);

/**
* Gets the X position in meters of the robot relative to the starting position.
*
* This function uses the following values of errno when an error state is
* reached:
* ENXIO - The given value is not within the range of V5 ports (1-21).
* ENODEV - The port cannot be configured as a GPS
* EAGAIN - The sensor is still calibrating
*
* \param port
* The V5 GPS port number from 1-21
*
* \return The X position in meters. If the operation failed,
* returns PROS_ERR_F and errno is set.
*/
double gps_get_x_position(uint8_t port);

/**
* Gets the Y position in meters of the robot relative to the starting position.
*
* This function uses the following values of errno when an error state is
* reached:
* ENXIO - The given value is not within the range of V5 ports (1-21).
* ENODEV - The port cannot be configured as a GPS
* EAGAIN - The sensor is still calibrating
*
* \param port
* The V5 GPS port number from 1-21
*
* \return The Y position in meters. If the operation failed,
* returns PROS_ERR_F and errno is set.
*/
double gps_get_y_position(uint8_t port);

/**
* Gets the pitch of the GPS in degrees relative to the starting orientation.
*
* This function uses the following values of errno when an error state is
* reached:
* ENXIO - The given value is not within the range of V5 ports (1-21).
* ENODEV - The port cannot be configured as a GPS
* EAGAIN - The sensor is still calibrating
*
* \param port
* The V5 GPS port number from 1-21
*
* \return The pitch in (-90,90] degree values. If the operation failed,
* returns PROS_ERR_F and errno is set.
*/
double gps_get_pitch(uint8_t port);

/**
* Gets the roll of the GPS in degrees relative to the starting orientation.
*
* This function uses the following values of errno when an error state is
* reached:
* ENXIO - The given value is not within the range of V5 ports (1-21).
* ENODEV - The port cannot be configured as a GPS
* EAGAIN - The sensor is still calibrating
*
* \param port
* The V5 GPS port number from 1-21
*
* \return The roll in (-180,180] degree values. If the operation failed,
* returns PROS_ERR_F and errno is set.
*/
double gps_get_roll(uint8_t port);

/**
* Gets the yaw of the GPS in degrees relative to the starting orientation.
*
* This function uses the following values of errno when an error state is
* reached:
* ENXIO - The given value is not within the range of V5 ports (1-21).
* ENODEV - The port cannot be configured as a GPS
* EAGAIN - The sensor is still calibrating
*
* \param port
* The V5 GPS port number from 1-21
*
* \return The yaw in (-180,180] degree values. If the operation failed,
* returns PROS_ERR_F and errno is set.
*/
double gps_get_yaw(uint8_t port);

/**
* Get the heading in [0,360) degree values.
*
Expand Down
75 changes: 75 additions & 0 deletions include/pros/gps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,81 @@ class Gps {
*/
virtual pros::c::gps_status_s_t get_status() const;

/**
* Gets the X position in meters of the robot relative to the starting position.
*
* This function uses the following values of errno when an error state is
* reached:
* ENXIO - The given value is not within the range of V5 ports (1-21).
* ENODEV - The port cannot be configured as a GPS
* EAGAIN - The sensor is still calibrating
*
*
* \return The X position in meters. If the operation failed,
* returns PROS_ERR_F and errno is set.
*/
virtual double get_x_position() const;

/**
* Gets the Y position in meters of the robot relative to the starting position.
*
* This function uses the following values of errno when an error state is
* reached:
* ENXIO - The given value is not within the range of V5 ports (1-21).
* ENODEV - The port cannot be configured as a GPS
* EAGAIN - The sensor is still calibrating
*
*
* \return The Y position in meters. If the operation failed,
* returns PROS_ERR_F and errno is set.
*/
virtual double get_y_position() const;

/**
* Gets the pitch of the GPS in degrees relative to the starting orientation.
*
* This function uses the following values of errno when an error state is
* reached:
* ENXIO - The given value is not within the range of V5 ports (1-21).
* ENODEV - The port cannot be configured as a GPS
* EAGAIN - The sensor is still calibrating
*
*
* \return The pitch in [0,360) degree values. If the operation failed,
* returns PROS_ERR_F and errno is set.
*/
virtual double get_pitch() const;

/**
* Gets the roll of the GPS in degrees relative to the starting orientation.
*
* This function uses the following values of errno when an error state is
* reached:
* ENXIO - The given value is not within the range of V5 ports (1-21).
* ENODEV - The port cannot be configured as a GPS
* EAGAIN - The sensor is still calibrating
*
*
* \return The roll in [0,360) degree values. If the operation failed,
* returns PROS_ERR_F and errno is set.
*/
virtual double get_roll() const;

/**
* Gets the yaw of the GPS in degrees relative to the starting orientation.
*
* This function uses the following values of errno when an error state is
* reached:
* ENXIO - The given value is not within the range of V5 ports (1-21).
* ENODEV - The port cannot be configured as a GPS
* EAGAIN - The sensor is still calibrating
*
*
* \return The yaw in [0,360) degree values. If the operation failed,
* returns PROS_ERR_F and errno is set.
*/
virtual double get_yaw() const;

/**
* Get the heading in [0,360) degree values.
*
Expand Down
3 changes: 2 additions & 1 deletion include/pros/imu.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ namespace c {
#endif

typedef enum imu_status_e {
E_IMU_STATUS_CALIBRATING = 0x01,
E_IMU_STATUS_READY = 0, // IMU is connected but not currently calibrating
E_IMU_STATUS_CALIBRATING = 19, // IMU is calibrating
E_IMU_STATUS_ERROR = 0xFF, // NOTE: used for returning an error from the get_status function, not that the IMU is
// necessarily in an error state
} imu_status_e_t;
Expand Down
Loading