From 26c073cb59c8308868cb2bec5fe68523b293995c Mon Sep 17 00:00:00 2001 From: phinc23 Date: Fri, 9 Feb 2024 18:41:43 -0500 Subject: [PATCH 01/10] Added GPS api. Initial commit tested. --- include/api.h | 6 ++--- include/pros/gps.h | 10 +++++++++ include/pros/gps.hpp | 10 +++++++++ src/devices/vdml_gps.c | 47 +++++++++++++++++++++++++++++++++++++++- src/devices/vdml_gps.cpp | 20 +++++++++++++++++ src/main.cpp | 7 ++++++ version | 2 +- 7 files changed, 97 insertions(+), 5 deletions(-) diff --git a/include/api.h b/include/api.h index 7e9231994..3f95a8b2b 100644 --- a/include/api.h +++ b/include/api.h @@ -40,9 +40,9 @@ #endif /* __cplusplus */ #define PROS_VERSION_MAJOR 3 -#define PROS_VERSION_MINOR 8 -#define PROS_VERSION_PATCH 0 -#define PROS_VERSION_STRING "3.8.0" +#define PROS_VERSION_MINOR 7 +#define PROS_VERSION_PATCH 4 +#define PROS_VERSION_STRING "3.7.4-dirty.19.1e7513d" #include "pros/adi.h" #include "pros/colors.h" diff --git a/include/pros/gps.h b/include/pros/gps.h index 1b2e7e7ba..7519001cb 100644 --- a/include/pros/gps.h +++ b/include/pros/gps.h @@ -188,6 +188,16 @@ double gps_get_error(uint8_t port); */ gps_status_s_t gps_get_status(uint8_t port); +double gps_get_x_position(uint8_t port); + +double gps_get_y_position(uint8_t port); + +double gps_get_pitch(uint8_t port); + +double gps_get_roll(uint8_t port); + +double gps_get_yaw(uint8_t port); + /** * Get the heading in [0,360) degree values. * diff --git a/include/pros/gps.hpp b/include/pros/gps.hpp index fce40c2a4..d791c66e2 100644 --- a/include/pros/gps.hpp +++ b/include/pros/gps.hpp @@ -232,6 +232,16 @@ class Gps { */ virtual std::int32_t set_rotation(double target) const; + virtual double get_x_position() const; + + virtual double get_y_position() const; + + virtual double get_pitch() const; + + virtual double get_roll() const; + + virtual double get_yaw() const; + /** * Tare the GPS sensor's rotation value * diff --git a/src/devices/vdml_gps.c b/src/devices/vdml_gps.c index 93b155006..32d044deb 100644 --- a/src/devices/vdml_gps.c +++ b/src/devices/vdml_gps.c @@ -87,6 +87,51 @@ gps_status_s_t gps_get_status(uint8_t port) { return_port(port - 1, rtv); } +double gps_get_x_position(uint8_t port) { + claim_port_f(port - 1, E_DEVICE_GPS); + double rtv = PROS_ERR_F; + V5_DeviceGpsAttitude data; + vexDeviceGpsAttitudeGet(device->device_info, &data, false); + rtv = data.position_x; + return_port(port - 1, rtv); +} + +double gps_get_y_position(uint8_t port) { + claim_port_f(port - 1, E_DEVICE_GPS); + double rtv = PROS_ERR_F; + V5_DeviceGpsAttitude data; + vexDeviceGpsAttitudeGet(device->device_info, &data, false); + rtv = data.position_y; + return_port(port - 1, rtv); +} + +double gps_get_pitch(uint8_t port) { + claim_port_f(port - 1, E_DEVICE_GPS); + double rtv = PROS_ERR_F; + V5_DeviceGpsAttitude data; + vexDeviceGpsAttitudeGet(device->device_info, &data, false); + rtv = data.pitch; + return_port(port - 1, rtv); +} + +double gps_get_roll(uint8_t port) { + claim_port_f(port - 1, E_DEVICE_GPS); + double rtv = PROS_ERR_F; + V5_DeviceGpsAttitude data; + vexDeviceGpsAttitudeGet(device->device_info, &data, false); + rtv = data.roll; + return_port(port - 1, rtv); +} + +double gps_get_yaw(uint8_t port) { + claim_port_f(port - 1, E_DEVICE_GPS); + double rtv = PROS_ERR_F; + V5_DeviceGpsAttitude data; + vexDeviceGpsAttitudeGet(device->device_info, &data, false); + rtv = data.yaw; + return_port(port - 1, rtv); +} + double gps_get_heading(uint8_t port) { claim_port_f(port - 1, E_DEVICE_GPS); double rtv = vexDeviceGpsDegreesGet(device->device_info); @@ -101,7 +146,7 @@ double gps_get_heading_raw(uint8_t port) { double gps_get_rotation(uint8_t port) { claim_port_f(port - 1, E_DEVICE_GPS); - double rtv = vexDeviceGpsRotationGet(device->device_info); + double rtv = vexDeviceGpsHeadingGet(device->device_info); return_port(port - 1, rtv); } diff --git a/src/devices/vdml_gps.cpp b/src/devices/vdml_gps.cpp index bc0d4e85a..df3d3efdb 100644 --- a/src/devices/vdml_gps.cpp +++ b/src/devices/vdml_gps.cpp @@ -43,6 +43,26 @@ pros::c::gps_status_s_t Gps::get_status() const { return pros::c::gps_get_status(_port); } +double Gps::get_x_position() const { + return pros::c::gps_get_x_position(_port); +} + +double Gps::get_y_position() const { + return pros::c::gps_get_y_position(_port); +} + +double Gps::get_pitch() const { + return pros::c::gps_get_pitch(_port); +} + +double Gps::get_roll() const { + return pros::c::gps_get_roll(_port); +} + +double Gps::get_yaw() const { + return pros::c::gps_get_yaw(_port); +} + double Gps::get_heading() const { return pros::c::gps_get_heading(_port); } diff --git a/src/main.cpp b/src/main.cpp index c2fbbf539..38a9b7933 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -77,6 +77,7 @@ void opcontrol() { pros::Controller master(pros::E_CONTROLLER_MASTER); pros::Motor left_mtr(1); pros::Motor right_mtr(2); + pros::Gps my_gps(10); while (true) { pros::lcd::print(0, "%d %d %d", (pros::lcd::read_buttons() & LCD_BTN_LEFT) >> 2, @@ -85,6 +86,12 @@ void opcontrol() { int left = master.get_analog(ANALOG_LEFT_Y); int right = master.get_analog(ANALOG_RIGHT_Y); + pros::lcd::print(2, "X pos: %fm, Y pos: %fm", my_gps.get_x_position(), my_gps.get_y_position()); + pros::lcd::print(3, "Pitch: %fdeg", my_gps.get_pitch()); + pros::lcd::print(4, "Roll: %fdeg", my_gps.get_roll()); + pros::lcd::print(5, "Yaw: %fdeg", my_gps.get_yaw()); + pros::lcd::print(6, "Get rotation: %fdeg", my_gps.get_rotation()); + left_mtr = left; right_mtr = right; diff --git a/version b/version index 19811903a..c354e3dfe 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.8.0 +3.7.4-dirty.19.1e7513d \ No newline at end of file From 59a7ed8e9193c4786d9e6bd5ee91bc371f15d112 Mon Sep 17 00:00:00 2001 From: phinc23 Date: Sat, 10 Feb 2024 11:16:27 -0500 Subject: [PATCH 02/10] Doxygenized and reverted --- include/api.h | 6 ++-- include/pros/gps.h | 75 ++++++++++++++++++++++++++++++++++++++ include/pros/gps.hpp | 85 ++++++++++++++++++++++++++++++++++++++------ src/main.cpp | 9 +---- 4 files changed, 154 insertions(+), 21 deletions(-) diff --git a/include/api.h b/include/api.h index 3f95a8b2b..7e9231994 100644 --- a/include/api.h +++ b/include/api.h @@ -40,9 +40,9 @@ #endif /* __cplusplus */ #define PROS_VERSION_MAJOR 3 -#define PROS_VERSION_MINOR 7 -#define PROS_VERSION_PATCH 4 -#define PROS_VERSION_STRING "3.7.4-dirty.19.1e7513d" +#define PROS_VERSION_MINOR 8 +#define PROS_VERSION_PATCH 0 +#define PROS_VERSION_STRING "3.8.0" #include "pros/adi.h" #include "pros/colors.h" diff --git a/include/pros/gps.h b/include/pros/gps.h index 7519001cb..1ab1d9540 100644 --- a/include/pros/gps.h +++ b/include/pros/gps.h @@ -188,14 +188,89 @@ 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.t. + */ double gps_get_y_position(uint8_t port); +/** + * Gets the pitch of the robot in degrees relative to the starting oreintation. + * + * 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 [0,360) degree values. If the operation failed, + * returns PROS_ERR_F and errno is se + */ double gps_get_pitch(uint8_t port); +/** + * Gets the roll of the robot in degrees relative to the starting oreintation. + * + * 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 [0,360) 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 robot in degrees relative to the starting oreintation. + * + * 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 [0,360) degree values. If the operation failed, + * returns PROS_ERR_F and errno is set. + */ double gps_get_yaw(uint8_t port); /** diff --git a/include/pros/gps.hpp b/include/pros/gps.hpp index d791c66e2..cea5f2aac 100644 --- a/include/pros/gps.hpp +++ b/include/pros/gps.hpp @@ -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 robot in degrees relative to the starting oreintation. + * + * 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 robot in degrees relative to the starting oreintation. + * + * 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 robot in degrees relative to the starting oreintation. + * + * 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. * @@ -232,16 +307,6 @@ class Gps { */ virtual std::int32_t set_rotation(double target) const; - virtual double get_x_position() const; - - virtual double get_y_position() const; - - virtual double get_pitch() const; - - virtual double get_roll() const; - - virtual double get_yaw() const; - /** * Tare the GPS sensor's rotation value * diff --git a/src/main.cpp b/src/main.cpp index 38a9b7933..13d12a0f0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -77,7 +77,6 @@ void opcontrol() { pros::Controller master(pros::E_CONTROLLER_MASTER); pros::Motor left_mtr(1); pros::Motor right_mtr(2); - pros::Gps my_gps(10); while (true) { pros::lcd::print(0, "%d %d %d", (pros::lcd::read_buttons() & LCD_BTN_LEFT) >> 2, @@ -86,15 +85,9 @@ void opcontrol() { int left = master.get_analog(ANALOG_LEFT_Y); int right = master.get_analog(ANALOG_RIGHT_Y); - pros::lcd::print(2, "X pos: %fm, Y pos: %fm", my_gps.get_x_position(), my_gps.get_y_position()); - pros::lcd::print(3, "Pitch: %fdeg", my_gps.get_pitch()); - pros::lcd::print(4, "Roll: %fdeg", my_gps.get_roll()); - pros::lcd::print(5, "Yaw: %fdeg", my_gps.get_yaw()); - pros::lcd::print(6, "Get rotation: %fdeg", my_gps.get_rotation()); - left_mtr = left; right_mtr = right; pros::delay(20); } -} +} \ No newline at end of file From e83c2100cc9efaefb50505d6d624bb9da803ab4e Mon Sep 17 00:00:00 2001 From: phinc23 <60949293+phinc23@users.noreply.github.com> Date: Sat, 10 Feb 2024 11:18:41 -0500 Subject: [PATCH 03/10] Delete version --- version | 1 - 1 file changed, 1 deletion(-) delete mode 100644 version diff --git a/version b/version deleted file mode 100644 index c354e3dfe..000000000 --- a/version +++ /dev/null @@ -1 +0,0 @@ -3.7.4-dirty.19.1e7513d \ No newline at end of file From b563a9e8d3bde07c543c5afb8939ea3344fc895d Mon Sep 17 00:00:00 2001 From: phinc23 <60949293+phinc23@users.noreply.github.com> Date: Sat, 10 Feb 2024 11:19:11 -0500 Subject: [PATCH 04/10] Delete main --- src/main.cpp | 93 ---------------------------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 src/main.cpp diff --git a/src/main.cpp b/src/main.cpp deleted file mode 100644 index 13d12a0f0..000000000 --- a/src/main.cpp +++ /dev/null @@ -1,93 +0,0 @@ -#include "main.h" - -/** - * A callback function for LLEMU's center button. - * - * When this callback is fired, it will toggle line 2 of the LCD text between - * "I was pressed!" and nothing. - */ -void on_center_button() { - static bool pressed = false; - pressed = !pressed; - if (pressed) { - pros::lcd::set_text(2, "I was pressed!"); - } else { - pros::lcd::clear_line(2); - } -} - -/** - * Runs initialization code. This occurs as soon as the program is started. - * - * All other competition modes are blocked by initialize; it is recommended - * to keep execution time for this mode under a few seconds. - */ -void initialize() { - pros::lcd::initialize(); - pros::lcd::set_text(1, "Hello PROS User!"); - - pros::lcd::register_btn1_cb(on_center_button); -} - -/** - * Runs while the robot is in the disabled state of Field Management System or - * the VEX Competition Switch, following either autonomous or opcontrol. When - * the robot is enabled, this task will exit. - */ -void disabled() {} - -/** - * Runs after initialize(), and before autonomous when connected to the Field - * Management System or the VEX Competition Switch. This is intended for - * competition-specific initialization routines, such as an autonomous selector - * on the LCD. - * - * This task will exit when the robot is enabled and autonomous or opcontrol - * starts. - */ -void competition_initialize() {} - -/** - * Runs the user autonomous code. This function will be started in its own task - * with the default priority and stack size whenever the robot is enabled via - * the Field Management System or the VEX Competition Switch in the autonomous - * mode. Alternatively, this function may be called in initialize or opcontrol - * for non-competition testing purposes. - * - * If the robot is disabled or communications is lost, the autonomous task - * will be stopped. Re-enabling the robot will restart the task, not re-start it - * from where it left off. - */ -void autonomous() {} - -/** - * Runs the operator control code. This function will be started in its own task - * with the default priority and stack size whenever the robot is enabled via - * the Field Management System or the VEX Competition Switch in the operator - * control mode. - * - * If no competition control is connected, this function will run immediately - * following initialize(). - * - * If the robot is disabled or communications is lost, the - * operator control task will be stopped. Re-enabling the robot will restart the - * task, not resume it from where it left off. - */ -void opcontrol() { - pros::Controller master(pros::E_CONTROLLER_MASTER); - pros::Motor left_mtr(1); - pros::Motor right_mtr(2); - - while (true) { - pros::lcd::print(0, "%d %d %d", (pros::lcd::read_buttons() & LCD_BTN_LEFT) >> 2, - (pros::lcd::read_buttons() & LCD_BTN_CENTER) >> 1, - (pros::lcd::read_buttons() & LCD_BTN_RIGHT) >> 0); - int left = master.get_analog(ANALOG_LEFT_Y); - int right = master.get_analog(ANALOG_RIGHT_Y); - - left_mtr = left; - right_mtr = right; - - pros::delay(20); - } -} \ No newline at end of file From 43d08d85363b1e0445d88262dfcdbcb818943593 Mon Sep 17 00:00:00 2001 From: phinc23 Date: Sat, 10 Feb 2024 11:34:34 -0500 Subject: [PATCH 05/10] Revert "Delete main" --- src/main.cpp | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 src/main.cpp diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 000000000..13d12a0f0 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,93 @@ +#include "main.h" + +/** + * A callback function for LLEMU's center button. + * + * When this callback is fired, it will toggle line 2 of the LCD text between + * "I was pressed!" and nothing. + */ +void on_center_button() { + static bool pressed = false; + pressed = !pressed; + if (pressed) { + pros::lcd::set_text(2, "I was pressed!"); + } else { + pros::lcd::clear_line(2); + } +} + +/** + * Runs initialization code. This occurs as soon as the program is started. + * + * All other competition modes are blocked by initialize; it is recommended + * to keep execution time for this mode under a few seconds. + */ +void initialize() { + pros::lcd::initialize(); + pros::lcd::set_text(1, "Hello PROS User!"); + + pros::lcd::register_btn1_cb(on_center_button); +} + +/** + * Runs while the robot is in the disabled state of Field Management System or + * the VEX Competition Switch, following either autonomous or opcontrol. When + * the robot is enabled, this task will exit. + */ +void disabled() {} + +/** + * Runs after initialize(), and before autonomous when connected to the Field + * Management System or the VEX Competition Switch. This is intended for + * competition-specific initialization routines, such as an autonomous selector + * on the LCD. + * + * This task will exit when the robot is enabled and autonomous or opcontrol + * starts. + */ +void competition_initialize() {} + +/** + * Runs the user autonomous code. This function will be started in its own task + * with the default priority and stack size whenever the robot is enabled via + * the Field Management System or the VEX Competition Switch in the autonomous + * mode. Alternatively, this function may be called in initialize or opcontrol + * for non-competition testing purposes. + * + * If the robot is disabled or communications is lost, the autonomous task + * will be stopped. Re-enabling the robot will restart the task, not re-start it + * from where it left off. + */ +void autonomous() {} + +/** + * Runs the operator control code. This function will be started in its own task + * with the default priority and stack size whenever the robot is enabled via + * the Field Management System or the VEX Competition Switch in the operator + * control mode. + * + * If no competition control is connected, this function will run immediately + * following initialize(). + * + * If the robot is disabled or communications is lost, the + * operator control task will be stopped. Re-enabling the robot will restart the + * task, not resume it from where it left off. + */ +void opcontrol() { + pros::Controller master(pros::E_CONTROLLER_MASTER); + pros::Motor left_mtr(1); + pros::Motor right_mtr(2); + + while (true) { + pros::lcd::print(0, "%d %d %d", (pros::lcd::read_buttons() & LCD_BTN_LEFT) >> 2, + (pros::lcd::read_buttons() & LCD_BTN_CENTER) >> 1, + (pros::lcd::read_buttons() & LCD_BTN_RIGHT) >> 0); + int left = master.get_analog(ANALOG_LEFT_Y); + int right = master.get_analog(ANALOG_RIGHT_Y); + + left_mtr = left; + right_mtr = right; + + pros::delay(20); + } +} \ No newline at end of file From 2540a83cf46d778863af64b54288d3f44a83dd92 Mon Sep 17 00:00:00 2001 From: phinc23 Date: Sat, 10 Feb 2024 12:06:17 -0500 Subject: [PATCH 06/10] Revert "Delete version" --- version | 1 + 1 file changed, 1 insertion(+) create mode 100644 version diff --git a/version b/version new file mode 100644 index 000000000..c354e3dfe --- /dev/null +++ b/version @@ -0,0 +1 @@ +3.7.4-dirty.19.1e7513d \ No newline at end of file From 194ae899cf14ff27a35c5f7cdaeae379350fe048 Mon Sep 17 00:00:00 2001 From: phinc23 Date: Sat, 10 Feb 2024 12:11:54 -0500 Subject: [PATCH 07/10] Fixed version # --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index c354e3dfe..0be1fc7d2 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.7.4-dirty.19.1e7513d \ No newline at end of file +3.8.0 \ No newline at end of file From 5f04304a9222c0cf03c71715db20a17ce7248bf7 Mon Sep 17 00:00:00 2001 From: phinc23 Date: Wed, 14 Feb 2024 21:32:43 -0500 Subject: [PATCH 08/10] Added newlines --- src/main.cpp | 2 +- version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 13d12a0f0..c2fbbf539 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -90,4 +90,4 @@ void opcontrol() { pros::delay(20); } -} \ No newline at end of file +} diff --git a/version b/version index 0be1fc7d2..19811903a 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.8.0 \ No newline at end of file +3.8.0 From b2c0db963884f90c648cd5c6249e9017d04cd591 Mon Sep 17 00:00:00 2001 From: phinc23 Date: Fri, 8 Mar 2024 15:51:02 -0500 Subject: [PATCH 09/10] Doxygen typo fixes --- include/pros/gps.h | 10 +++++----- include/pros/gps.hpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/pros/gps.h b/include/pros/gps.h index 1ab1d9540..e94865804 100644 --- a/include/pros/gps.h +++ b/include/pros/gps.h @@ -218,12 +218,12 @@ double gps_get_x_position(uint8_t 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.t. + * returns PROS_ERR_F and errno is set. */ double gps_get_y_position(uint8_t port); /** - * Gets the pitch of the robot in degrees relative to the starting oreintation. + * 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: @@ -235,12 +235,12 @@ double gps_get_y_position(uint8_t port); * The V5 GPS port number from 1-21 * * \return The pitch in [0,360) degree values. If the operation failed, - * returns PROS_ERR_F and errno is se + * returns PROS_ERR_F and errno is set. */ double gps_get_pitch(uint8_t port); /** - * Gets the roll of the robot in degrees relative to the starting oreintation. + * 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: @@ -257,7 +257,7 @@ double gps_get_pitch(uint8_t port); double gps_get_roll(uint8_t port); /** - * Gets the yaw of the robot in degrees relative to the starting oreintation. + * 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: diff --git a/include/pros/gps.hpp b/include/pros/gps.hpp index cea5f2aac..f25bd6087 100644 --- a/include/pros/gps.hpp +++ b/include/pros/gps.hpp @@ -204,7 +204,7 @@ class Gps { virtual double get_y_position() const; /** - * Gets the pitch of the robot in degrees relative to the starting oreintation. + * 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: @@ -219,7 +219,7 @@ class Gps { virtual double get_pitch() const; /** - * Gets the roll of the robot in degrees relative to the starting oreintation. + * 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: @@ -234,7 +234,7 @@ class Gps { virtual double get_roll() const; /** - * Gets the yaw of the robot in degrees relative to the starting oreintation. + * 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: From 4411df589da8beb20056046c4260ae2337ac12b7 Mon Sep 17 00:00:00 2001 From: phinc23 Date: Fri, 8 Mar 2024 17:59:51 -0500 Subject: [PATCH 10/10] Fixed degree range doxy --- include/pros/gps.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pros/gps.h b/include/pros/gps.h index e94865804..917f69387 100644 --- a/include/pros/gps.h +++ b/include/pros/gps.h @@ -234,7 +234,7 @@ double gps_get_y_position(uint8_t port); * \param port * The V5 GPS port number from 1-21 * - * \return The pitch in [0,360) degree values. If the operation failed, + * \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); @@ -251,7 +251,7 @@ double gps_get_pitch(uint8_t port); * \param port * The V5 GPS port number from 1-21 * - * \return The roll in [0,360) degree values. If the operation failed, + * \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); @@ -268,7 +268,7 @@ double gps_get_roll(uint8_t port); * \param port * The V5 GPS port number from 1-21 * - * \return The yaw in [0,360) degree values. If the operation failed, + * \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);