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

✨Field Control State Getter #608

Merged
merged 7 commits into from
Oct 27, 2023

Conversation

CChheerryyll
Copy link
Contributor

Summary:

Added two functions to check if the brain is connected to field control or competition switch.

Motivation:

References (optional):

closes #471

Test Plan:

connect the brain to competition switch/field control and call the two functions to see if they return the correct value

@CChheerryyll CChheerryyll requested a review from noam987 October 12, 2023 23:47
@djava
Copy link
Contributor

djava commented Oct 13, 2023

Test-plan wise, there are a few types of field control. Should probably be tested with both the normal older field controller and the new v5 brain-based smart field control

@noam987
Copy link
Contributor

noam987 commented Oct 13, 2023

Test-plan wise, there are a few types of field control. Should probably be tested with both the normal older field controller and the new v5 brain-based smart field control

It has been tested on both the smart field control and the old field control switches

Copy link
Contributor

@noam987 noam987 left a comment

Choose a reason for hiding this comment

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

The changes you made in controler and misc look great, and I'm exited about this functionality. I'm going to make a quick clean up commit to fix some side effects of the merge conflicts and this will be good to be merged

@@ -41,6 +41,7 @@
#define COMPETITION_DISABLED (1 << 0)
#define COMPETITION_AUTONOMOUS (1 << 1)
#define COMPETITION_CONNECTED (1 << 2)
#define COMPETITION_SYSTEM (1 << 3)
Copy link
Member

Choose a reason for hiding this comment

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

since we're making breaking changes anyways, do we want to switch this into an enum instead? If it's a readability thing with bits we could also just add a comment or support both enums and the old macros.

/**
* \return True if the V5 Brain is connected to VEXnet Field Controller, false otherwise.
*/
#define competition_is_field_control() ((competition_get_status() & COMPETITION_SYSTEM) != 0)
Copy link
Member

Choose a reason for hiding this comment

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

ditto on the macro thing... maybe these could be functions?

/**
* \return True if the V5 Brain is connected to VEXnet Competition Switch, false otherwise.
*/
#define competition_is_competition_switch() ((competition_get_status() & COMPETITION_SYSTEM) == 0)
Copy link
Member

Choose a reason for hiding this comment

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

we should come up with a better naming scheme for these, I know it's a legacy thing but man competition_is_competition is kind of repetitive.

src/main.cpp Outdated
Comment on lines 61 to 79
void autonomous() {
while (1) {
if (pros::competition::is_field_control()) {
printf("[Auton] testing is_field_control(): true\n");
}
else {
printf("[Auton] testing is_field_control(): false\n");
}

if (pros::competition::is_competition_switch()) {
printf("[Auton] testing is_competition_switch(): true\n");
}
else {
printf("[Auton] testing is_competition_switch(): false\n");
}

pros::delay(1000);
}
}
Copy link
Member

Choose a reason for hiding this comment

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

be sure to remove this before merge.

version Outdated
4.0.5
Copy link
Member

Choose a reason for hiding this comment

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

forgot the newline... somebody did somewhere earlier as well. Please add it back

Copy link
Contributor

@noam987 noam987 left a comment

Choose a reason for hiding this comment

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

LGTM

@noam987 noam987 requested a review from WillXuCodes October 27, 2023 19:06
@noam987 noam987 merged commit fd33eea into develop-pros-4 Oct 27, 2023
1 check passed
noam987 added a commit that referenced this pull request May 5, 2024
* Update version

* 🐛 Fix pros::E_TEXT_LARGE_CENTER Simple Name

* Update version numbers

* 🐛Motor bug fixes and add new set_gearing (#611)

* ✨Add list_files function (#612)

* Add list_files

* renamed c function

* Clarify the docs

* ✨ ADI Get Port (#613)

* Initial Commit. Added get_port() for adi.

* Second commit. Fixed changes.

* 🐛Vex link default override (#614)

* Initial Commit. Changed defualt param.

* Fixed param docs

* ✨Field Control State Getter (#608)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* Added vexFileSync when writing to files (#619)

* 🐛Fix rotation sensor reversed port (#618)

* 🐛 Field Control Getter Return Value (#627)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

* fix return value issue

* fixed version

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* ✨default the VFS to the sd card (#621)

* Fix motor voltage limit port mutex returning

* Initial implementation for get_all_devices

* Remove use of templating

* modify gps functions

* add example code to gps header files

* revert api.h and version

* add newline at end of gps.c

* add newline at end of version

* Completed get_all_devices member function for all critical devices

* Fix compile issues

* 🐛ADI mutex fix (#633)

* Fixed duplicate zero indexing in ext_adi_led_set_pixel as well as validate_type

* testing

* Fixed zero indexing

* fix merge

* removes an extra -1

* Add missing -1

* Last -1

* Fix return without releasing mutex

---------

Co-authored-by: noam987 <[email protected]>

* ✨Adds static getters for some devices (#653)

* imu_v1

* revert main.cpp

* Add injector for gps

* rename to _ casing and add vision sensor

* 📝 PROS 4: Documentation Fixes for optical and distance sensor (#654)

* Documentation Fixes for optical sensor

* Distance sensor documentation fixes

* Added alias function get_distance for get for distance sensor

* Update get_distance func header for distance sensor

* 🐛Fixed Imu::is_calibrating function for PROS 4 #626 (#629)

* Fixed Imu::is_calibrating function

Updated imu status enums to properly reflect values returned by get_status. Also modifed imu::is_calibrating so it returns the correct value.

* Bugfixes from the pros 3 version

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* 🐛Remove = overload from motor groups (#656)

---------

Co-authored-by: Richard Stump <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: phinc23 <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Sprocket Riggs <[email protected]>
Co-authored-by: Cooper7196 <[email protected]>
Co-authored-by: Gavin-Niederman <[email protected]>
Co-authored-by: aberiggs <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Gracelu128 <[email protected]>
Co-authored-by: Richard Li <[email protected]>
noam987 added a commit that referenced this pull request May 18, 2024
…ad of MotorGroup& (#661)

* 📝Update docs for pre-release (#657)

* Update version

* 🐛 Fix pros::E_TEXT_LARGE_CENTER Simple Name

* Update version numbers

* 🐛Motor bug fixes and add new set_gearing (#611)

* ✨Add list_files function (#612)

* Add list_files

* renamed c function

* Clarify the docs

* ✨ ADI Get Port (#613)

* Initial Commit. Added get_port() for adi.

* Second commit. Fixed changes.

* 🐛Vex link default override (#614)

* Initial Commit. Changed defualt param.

* Fixed param docs

* ✨Field Control State Getter (#608)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* Added vexFileSync when writing to files (#619)

* 🐛Fix rotation sensor reversed port (#618)

* 🐛 Field Control Getter Return Value (#627)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

* fix return value issue

* fixed version

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* ✨default the VFS to the sd card (#621)

* Fix motor voltage limit port mutex returning

* Initial implementation for get_all_devices

* Remove use of templating

* modify gps functions

* add example code to gps header files

* revert api.h and version

* add newline at end of gps.c

* add newline at end of version

* Completed get_all_devices member function for all critical devices

* Fix compile issues

* 🐛ADI mutex fix (#633)

* Fixed duplicate zero indexing in ext_adi_led_set_pixel as well as validate_type

* testing

* Fixed zero indexing

* fix merge

* removes an extra -1

* Add missing -1

* Last -1

* Fix return without releasing mutex

---------

Co-authored-by: noam987 <[email protected]>

* ✨Adds static getters for some devices (#653)

* imu_v1

* revert main.cpp

* Add injector for gps

* rename to _ casing and add vision sensor

* 📝 PROS 4: Documentation Fixes for optical and distance sensor (#654)

* Documentation Fixes for optical sensor

* Distance sensor documentation fixes

* Added alias function get_distance for get for distance sensor

* Update get_distance func header for distance sensor

* 🐛Fixed Imu::is_calibrating function for PROS 4 #626 (#629)

* Fixed Imu::is_calibrating function

Updated imu status enums to properly reflect values returned by get_status. Also modifed imu::is_calibrating so it returns the correct value.

* Bugfixes from the pros 3 version

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* 🐛Remove = overload from motor groups (#656)

---------

Co-authored-by: Richard Stump <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: phinc23 <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Sprocket Riggs <[email protected]>
Co-authored-by: Cooper7196 <[email protected]>
Co-authored-by: Gavin-Niederman <[email protected]>
Co-authored-by: aberiggs <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Gracelu128 <[email protected]>
Co-authored-by: Richard Li <[email protected]>

* Fix motor docs

* minor docs fixes

* Compiles, haven't tested past that

* Revert main.cpp

* remove extra includes in main

* another small style fix

* ixed issue found during testing

---------

Co-authored-by: Richard Stump <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: phinc23 <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Sprocket Riggs <[email protected]>
Co-authored-by: Cooper7196 <[email protected]>
Co-authored-by: Gavin-Niederman <[email protected]>
Co-authored-by: aberiggs <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Gracelu128 <[email protected]>
Co-authored-by: Richard Li <[email protected]>
phinc23 added a commit that referenced this pull request May 19, 2024
* Start of work on motors docs

* Add descriptions for color files.

* Error.h

* gps.hpp done

* Gps.h done

* More motors docs

* Motor docs and fixed the build

* added changes to device.hpp, distance.hpp and
imu.hpp

* Revert "added changes to device.hpp, distance.hpp and"

This reverts commit 380a2de.

* Do the link files

* attempt to fix issue with ADI

* Fix ADI Doc value

* Remove accidental addition of extra bracket

* AbstractMotor work

* attempt to refix something

* yep looks like that was the culprit

* Add it back because it was breaking stuff

* The serial files

* Optical cpp examples

* Get rid of legacy api file (nobody uses PROS 2 API anymore)

* Update documentation for the llemu api

* Update rtos.h

* Attempt to fix adi doc bracketing

* Update rtos.h

* Fix up formatting on rtos.h

* try something really stupid

* Finished functions in motors.h

* progress on motors.hpp

* Update adi bracketting

* Fix adi.h bracketing again

* Comment brackets in rtos.h

* Try removing \enum and \typedef to see if that breaks m.css

* Try removing \def

* Try some more things to fix CI

* Strip name and group commands to see if that lets the CI get further

* More more motors.hpp work

* Update rtos.h

* More rtos.h updates

* abstract motor work

* rotation.h and rotation.hpp documentation

* Fixes to code examples.

* do some of the _all functions

* more stuff

* imu_set_euler

* MOTORS.HPP DONE

* added example for device.h

* fix typo

* added example for device.hpp

* fix issue

* fix formatting

* fix and add example in distance.h

* WIP on rtos.hpp

* ext_adi.h file

* fix typo in distance.h

* motors and motor group fixes

* Trying to fix motor linking

* Wip in rtos

* update example in device.hpp

* updated device.hpp examples

* updated distance.hpp examples

* fix typo in device.h

* fix typo in device.hpp

* Vision c++ header docs

* Update motors

* docs for mics, screen and abstract_motor(enum)

* Fix up device file, apix.h work

* added example for constructors in device.hpp and
distance.hpp

* imu.hpp function examples

* Small edit for imu.hpp function examples

* Added header for imu.hpp constructor

* Small edit for imu.hpp constructor header

* Remove links

* Fix up color and device files

* Finish rtos.h and rtos.hpp

* Fix cpp-link

* Fixes to motors docs

* Rotation.hpp docs updates

* Reverse Flag param in Rotation constructor

* Formatting fixes

* Fix motor groups and fix colors

* fixed file for motor group

* Fix bracketing

* Fix MG docs

* Remove PROS 2 references, fix up readmes

* Another fix

* Most of the work done for motor groups

* Fix missing end codes

* Almost done

* FINISHED MOTOR GROUPS

* added namespace for screen.hpp

* Update version

* Fix a couple enum/struct issues

* 📝 Some fixes for motor headers

* 📝 Some fixes for enums

* 🐛Motor bug fixes and add new set_gearing (#611)

* ✨Add list_files function (#612)

* Add list_files

* renamed c function

* Clarify the docs

* ✨ ADI Get Port (#613)

* Initial Commit. Added get_port() for adi.

* Second commit. Fixed changes.

* 🐛Vex link default override (#614)

* Initial Commit. Changed defualt param.

* Fixed param docs

* ✨Field Control State Getter (#608)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* Added vexFileSync when writing to files (#619)

* 🐛Fix rotation sensor reversed port (#618)

* 🐛 Field Control Getter Return Value (#627)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

* fix return value issue

* fixed version

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* ✨default the VFS to the sd card (#621)

* Fix motor voltage limit port mutex returning

* Initial implementation for get_all_devices

* Remove use of templating

* modify gps functions

* add example code to gps header files

* revert api.h and version

* add newline at end of gps.c

* add newline at end of version

* Completed get_all_devices member function for all critical devices

* Fix compile issues

* 🐛ADI mutex fix (#633)

* Fixed duplicate zero indexing in ext_adi_led_set_pixel as well as validate_type

* testing

* Fixed zero indexing

* fix merge

* removes an extra -1

* Add missing -1

* Last -1

* Fix return without releasing mutex

---------

Co-authored-by: noam987 <[email protected]>

* ✨Adds static getters for some devices (#653)

* imu_v1

* revert main.cpp

* Add injector for gps

* rename to _ casing and add vision sensor

* 📝 PROS 4: Documentation Fixes for optical and distance sensor (#654)

* Documentation Fixes for optical sensor

* Distance sensor documentation fixes

* Added alias function get_distance for get for distance sensor

* Update get_distance func header for distance sensor

* 🐛Fixed Imu::is_calibrating function for PROS 4 #626 (#629)

* Fixed Imu::is_calibrating function

Updated imu status enums to properly reflect values returned by get_status. Also modifed imu::is_calibrating so it returns the correct value.

* Bugfixes from the pros 3 version

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* 🐛Remove = overload from motor groups (#656)

* 📝Update docs for pre-release (#657)

* Update version

* 🐛 Fix pros::E_TEXT_LARGE_CENTER Simple Name

* Update version numbers

* 🐛Motor bug fixes and add new set_gearing (#611)

* ✨Add list_files function (#612)

* Add list_files

* renamed c function

* Clarify the docs

* ✨ ADI Get Port (#613)

* Initial Commit. Added get_port() for adi.

* Second commit. Fixed changes.

* 🐛Vex link default override (#614)

* Initial Commit. Changed defualt param.

* Fixed param docs

* ✨Field Control State Getter (#608)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* Added vexFileSync when writing to files (#619)

* 🐛Fix rotation sensor reversed port (#618)

* 🐛 Field Control Getter Return Value (#627)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

* fix return value issue

* fixed version

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* ✨default the VFS to the sd card (#621)

* Fix motor voltage limit port mutex returning

* Initial implementation for get_all_devices

* Remove use of templating

* modify gps functions

* add example code to gps header files

* revert api.h and version

* add newline at end of gps.c

* add newline at end of version

* Completed get_all_devices member function for all critical devices

* Fix compile issues

* 🐛ADI mutex fix (#633)

* Fixed duplicate zero indexing in ext_adi_led_set_pixel as well as validate_type

* testing

* Fixed zero indexing

* fix merge

* removes an extra -1

* Add missing -1

* Last -1

* Fix return without releasing mutex

---------

Co-authored-by: noam987 <[email protected]>

* ✨Adds static getters for some devices (#653)

* imu_v1

* revert main.cpp

* Add injector for gps

* rename to _ casing and add vision sensor

* 📝 PROS 4: Documentation Fixes for optical and distance sensor (#654)

* Documentation Fixes for optical sensor

* Distance sensor documentation fixes

* Added alias function get_distance for get for distance sensor

* Update get_distance func header for distance sensor

* 🐛Fixed Imu::is_calibrating function for PROS 4 #626 (#629)

* Fixed Imu::is_calibrating function

Updated imu status enums to properly reflect values returned by get_status. Also modifed imu::is_calibrating so it returns the correct value.

* Bugfixes from the pros 3 version

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* 🐛Remove = overload from motor groups (#656)

---------

Co-authored-by: Richard Stump <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: phinc23 <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Sprocket Riggs <[email protected]>
Co-authored-by: Cooper7196 <[email protected]>
Co-authored-by: Gavin-Niederman <[email protected]>
Co-authored-by: aberiggs <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Gracelu128 <[email protected]>
Co-authored-by: Richard Li <[email protected]>

* Update version numbers (#658)

* 🐛Fix imu get device typo (#659)

* Fix motor docs

* minor docs fixes

* 📝 Fix typo in main.h (#662)

* Add documentation to literals

* 📝 Fix typo in main.cpp (#663)

* Fix a typo in main.h

* Fix a typo in main.cpp

* 🐛Converts appending, and constructors to take in AbstractMotor& instead of MotorGroup& (#661)

* 📝Update docs for pre-release (#657)

* Update version

* 🐛 Fix pros::E_TEXT_LARGE_CENTER Simple Name

* Update version numbers

* 🐛Motor bug fixes and add new set_gearing (#611)

* ✨Add list_files function (#612)

* Add list_files

* renamed c function

* Clarify the docs

* ✨ ADI Get Port (#613)

* Initial Commit. Added get_port() for adi.

* Second commit. Fixed changes.

* 🐛Vex link default override (#614)

* Initial Commit. Changed defualt param.

* Fixed param docs

* ✨Field Control State Getter (#608)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* Added vexFileSync when writing to files (#619)

* 🐛Fix rotation sensor reversed port (#618)

* 🐛 Field Control Getter Return Value (#627)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

* fix return value issue

* fixed version

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* ✨default the VFS to the sd card (#621)

* Fix motor voltage limit port mutex returning

* Initial implementation for get_all_devices

* Remove use of templating

* modify gps functions

* add example code to gps header files

* revert api.h and version

* add newline at end of gps.c

* add newline at end of version

* Completed get_all_devices member function for all critical devices

* Fix compile issues

* 🐛ADI mutex fix (#633)

* Fixed duplicate zero indexing in ext_adi_led_set_pixel as well as validate_type

* testing

* Fixed zero indexing

* fix merge

* removes an extra -1

* Add missing -1

* Last -1

* Fix return without releasing mutex

---------

Co-authored-by: noam987 <[email protected]>

* ✨Adds static getters for some devices (#653)

* imu_v1

* revert main.cpp

* Add injector for gps

* rename to _ casing and add vision sensor

* 📝 PROS 4: Documentation Fixes for optical and distance sensor (#654)

* Documentation Fixes for optical sensor

* Distance sensor documentation fixes

* Added alias function get_distance for get for distance sensor

* Update get_distance func header for distance sensor

* 🐛Fixed Imu::is_calibrating function for PROS 4 #626 (#629)

* Fixed Imu::is_calibrating function

Updated imu status enums to properly reflect values returned by get_status. Also modifed imu::is_calibrating so it returns the correct value.

* Bugfixes from the pros 3 version

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>

* 🐛Remove = overload from motor groups (#656)

---------

Co-authored-by: Richard Stump <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: phinc23 <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Sprocket Riggs <[email protected]>
Co-authored-by: Cooper7196 <[email protected]>
Co-authored-by: Gavin-Niederman <[email protected]>
Co-authored-by: aberiggs <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Gracelu128 <[email protected]>
Co-authored-by: Richard Li <[email protected]>

* Fix motor docs

* minor docs fixes

* Compiles, haven't tested past that

* Revert main.cpp

* remove extra includes in main

* another small style fix

* ixed issue found during testing

---------

Co-authored-by: Richard Stump <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: phinc23 <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Sprocket Riggs <[email protected]>
Co-authored-by: Cooper7196 <[email protected]>
Co-authored-by: Gavin-Niederman <[email protected]>
Co-authored-by: aberiggs <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Gracelu128 <[email protected]>
Co-authored-by: Richard Li <[email protected]>

* 📝Docs + implementation forgotten for rotation sensor (#665)

* Fix compile issues

* Update version nums

---------

Co-authored-by: Noam987 <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: Richard Stump <[email protected]>
Co-authored-by: Aaryan Gautam <[email protected]>
Co-authored-by: Andrew Lu <[email protected]>
Co-authored-by: aberiggs <[email protected]>
Co-authored-by: Grace Lu <[email protected]>
Co-authored-by: AnnZi <[email protected]>
Co-authored-by: Jerrylum <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: noam987 <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Sprocket Riggs <[email protected]>
Co-authored-by: Cooper7196 <[email protected]>
Co-authored-by: Gavin-Niederman <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Gracelu128 <[email protected]>
Co-authored-by: Richard Li <[email protected]>
Co-authored-by: THERocky <[email protected]>
noam987 added a commit that referenced this pull request May 19, 2024
* Start of work on motors docs

* Add descriptions for color files.

* Error.h

* gps.hpp done

* Gps.h done

* More motors docs

* Motor docs and fixed the build

* added changes to device.hpp, distance.hpp and
imu.hpp

* Revert "added changes to device.hpp, distance.hpp and"

This reverts commit 380a2de.

* Do the link files

* attempt to fix issue with ADI

* Fix ADI Doc value

* Remove accidental addition of extra bracket

* AbstractMotor work

* attempt to refix something

* yep looks like that was the culprit

* Add it back because it was breaking stuff

* The serial files

* Optical cpp examples

* Get rid of legacy api file (nobody uses PROS 2 API anymore)

* Update documentation for the llemu api

* Update rtos.h

* Attempt to fix adi doc bracketing

* Update rtos.h

* Fix up formatting on rtos.h

* try something really stupid

* Finished functions in motors.h

* progress on motors.hpp

* Update adi bracketting

* Fix adi.h bracketing again

* Comment brackets in rtos.h

* Try removing \enum and \typedef to see if that breaks m.css

* Try removing \def

* Try some more things to fix CI

* Strip name and group commands to see if that lets the CI get further

* More more motors.hpp work

* Update rtos.h

* More rtos.h updates

* abstract motor work

* rotation.h and rotation.hpp documentation

* Fixes to code examples.

* do some of the _all functions

* more stuff

* imu_set_euler

* MOTORS.HPP DONE

* added example for device.h

* fix typo

* added example for device.hpp

* fix issue

* fix formatting

* fix and add example in distance.h

* WIP on rtos.hpp

* ext_adi.h file

* fix typo in distance.h

* motors and motor group fixes

* Trying to fix motor linking

* Wip in rtos

* update example in device.hpp

* updated device.hpp examples

* updated distance.hpp examples

* fix typo in device.h

* fix typo in device.hpp

* Vision c++ header docs

* Update motors

* docs for mics, screen and abstract_motor(enum)

* Fix up device file, apix.h work

* added example for constructors in device.hpp and
distance.hpp

* imu.hpp function examples

* Small edit for imu.hpp function examples

* Added header for imu.hpp constructor

* Small edit for imu.hpp constructor header

* Remove links

* Fix up color and device files

* Finish rtos.h and rtos.hpp

* Fix cpp-link

* Fixes to motors docs

* Rotation.hpp docs updates

* Reverse Flag param in Rotation constructor

* Formatting fixes

* Fix motor groups and fix colors

* fixed file for motor group

* Fix bracketing

* Fix MG docs

* Remove PROS 2 references, fix up readmes

* Another fix

* Most of the work done for motor groups

* Fix missing end codes

* Almost done

* FINISHED MOTOR GROUPS

* added namespace for screen.hpp

* Update version

* Fix a couple enum/struct issues

* 📝 Some fixes for motor headers

* 📝 Some fixes for enums

* 🐛Motor bug fixes and add new set_gearing (#611)

* ✨Add list_files function (#612)

* Add list_files

* renamed c function

* Clarify the docs

* ✨ ADI Get Port (#613)

* Initial Commit. Added get_port() for adi.

* Second commit. Fixed changes.

* 🐛Vex link default override (#614)

* Initial Commit. Changed defualt param.

* Fixed param docs

* ✨Field Control State Getter (#608)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

---------




* Added vexFileSync when writing to files (#619)

* 🐛Fix rotation sensor reversed port (#618)

* 🐛 Field Control Getter Return Value (#627)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

* fix return value issue

* fixed version

---------




* ✨default the VFS to the sd card (#621)

* Fix motor voltage limit port mutex returning

* Initial implementation for get_all_devices

* Remove use of templating

* modify gps functions

* add example code to gps header files

* revert api.h and version

* add newline at end of gps.c

* add newline at end of version

* Completed get_all_devices member function for all critical devices

* Fix compile issues

* 🐛ADI mutex fix (#633)

* Fixed duplicate zero indexing in ext_adi_led_set_pixel as well as validate_type

* testing

* Fixed zero indexing

* fix merge

* removes an extra -1

* Add missing -1

* Last -1

* Fix return without releasing mutex

---------



* ✨Adds static getters for some devices (#653)

* imu_v1

* revert main.cpp

* Add injector for gps

* rename to _ casing and add vision sensor

* 📝 PROS 4: Documentation Fixes for optical and distance sensor (#654)

* Documentation Fixes for optical sensor

* Distance sensor documentation fixes

* Added alias function get_distance for get for distance sensor

* Update get_distance func header for distance sensor

* 🐛Fixed Imu::is_calibrating function for PROS 4 #626 (#629)

* Fixed Imu::is_calibrating function

Updated imu status enums to properly reflect values returned by get_status. Also modifed imu::is_calibrating so it returns the correct value.

* Bugfixes from the pros 3 version

---------




* 🐛Remove = overload from motor groups (#656)

* 📝Update docs for pre-release (#657)

* Update version

* 🐛 Fix pros::E_TEXT_LARGE_CENTER Simple Name

* Update version numbers

* 🐛Motor bug fixes and add new set_gearing (#611)

* ✨Add list_files function (#612)

* Add list_files

* renamed c function

* Clarify the docs

* ✨ ADI Get Port (#613)

* Initial Commit. Added get_port() for adi.

* Second commit. Fixed changes.

* 🐛Vex link default override (#614)

* Initial Commit. Changed defualt param.

* Fixed param docs

* ✨Field Control State Getter (#608)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

---------




* Added vexFileSync when writing to files (#619)

* 🐛Fix rotation sensor reversed port (#618)

* 🐛 Field Control Getter Return Value (#627)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

* fix return value issue

* fixed version

---------




* ✨default the VFS to the sd card (#621)

* Fix motor voltage limit port mutex returning

* Initial implementation for get_all_devices

* Remove use of templating

* modify gps functions

* add example code to gps header files

* revert api.h and version

* add newline at end of gps.c

* add newline at end of version

* Completed get_all_devices member function for all critical devices

* Fix compile issues

* 🐛ADI mutex fix (#633)

* Fixed duplicate zero indexing in ext_adi_led_set_pixel as well as validate_type

* testing

* Fixed zero indexing

* fix merge

* removes an extra -1

* Add missing -1

* Last -1

* Fix return without releasing mutex

---------



* ✨Adds static getters for some devices (#653)

* imu_v1

* revert main.cpp

* Add injector for gps

* rename to _ casing and add vision sensor

* 📝 PROS 4: Documentation Fixes for optical and distance sensor (#654)

* Documentation Fixes for optical sensor

* Distance sensor documentation fixes

* Added alias function get_distance for get for distance sensor

* Update get_distance func header for distance sensor

* 🐛Fixed Imu::is_calibrating function for PROS 4 #626 (#629)

* Fixed Imu::is_calibrating function

Updated imu status enums to properly reflect values returned by get_status. Also modifed imu::is_calibrating so it returns the correct value.

* Bugfixes from the pros 3 version

---------




* 🐛Remove = overload from motor groups (#656)

---------














* Update version numbers (#658)

* 🐛Fix imu get device typo (#659)

* Fix motor docs

* minor docs fixes

* 📝 Fix typo in main.h (#662)

* Add documentation to literals

* 📝 Fix typo in main.cpp (#663)

* Fix a typo in main.h

* Fix a typo in main.cpp

* 🐛Converts appending, and constructors to take in AbstractMotor& instead of MotorGroup& (#661)

* 📝Update docs for pre-release (#657)

* Update version

* 🐛 Fix pros::E_TEXT_LARGE_CENTER Simple Name

* Update version numbers

* 🐛Motor bug fixes and add new set_gearing (#611)

* ✨Add list_files function (#612)

* Add list_files

* renamed c function

* Clarify the docs

* ✨ ADI Get Port (#613)

* Initial Commit. Added get_port() for adi.

* Second commit. Fixed changes.

* 🐛Vex link default override (#614)

* Initial Commit. Changed defualt param.

* Fixed param docs

* ✨Field Control State Getter (#608)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

---------




* Added vexFileSync when writing to files (#619)

* 🐛Fix rotation sensor reversed port (#618)

* 🐛 Field Control Getter Return Value (#627)

* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

* fix return value issue

* fixed version

---------




* ✨default the VFS to the sd card (#621)

* Fix motor voltage limit port mutex returning

* Initial implementation for get_all_devices

* Remove use of templating

* modify gps functions

* add example code to gps header files

* revert api.h and version

* add newline at end of gps.c

* add newline at end of version

* Completed get_all_devices member function for all critical devices

* Fix compile issues

* 🐛ADI mutex fix (#633)

* Fixed duplicate zero indexing in ext_adi_led_set_pixel as well as validate_type

* testing

* Fixed zero indexing

* fix merge

* removes an extra -1

* Add missing -1

* Last -1

* Fix return without releasing mutex

---------



* ✨Adds static getters for some devices (#653)

* imu_v1

* revert main.cpp

* Add injector for gps

* rename to _ casing and add vision sensor

* 📝 PROS 4: Documentation Fixes for optical and distance sensor (#654)

* Documentation Fixes for optical sensor

* Distance sensor documentation fixes

* Added alias function get_distance for get for distance sensor

* Update get_distance func header for distance sensor

* 🐛Fixed Imu::is_calibrating function for PROS 4 #626 (#629)

* Fixed Imu::is_calibrating function

Updated imu status enums to properly reflect values returned by get_status. Also modifed imu::is_calibrating so it returns the correct value.

* Bugfixes from the pros 3 version

---------




* 🐛Remove = overload from motor groups (#656)

---------














* Fix motor docs

* minor docs fixes

* Compiles, haven't tested past that

* Revert main.cpp

* remove extra includes in main

* another small style fix

* ixed issue found during testing

---------














* 📝Docs + implementation forgotten for rotation sensor (#665)

* Fix compile issues

* Update version nums

---------

Co-authored-by: phinc23 <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: Richard Stump <[email protected]>
Co-authored-by: Aaryan Gautam <[email protected]>
Co-authored-by: Andrew Lu <[email protected]>
Co-authored-by: aberiggs <[email protected]>
Co-authored-by: Grace Lu <[email protected]>
Co-authored-by: AnnZi <[email protected]>
Co-authored-by: Jerrylum <[email protected]>
Co-authored-by: Will Xu <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Sprocket Riggs <[email protected]>
Co-authored-by: Cooper7196 <[email protected]>
Co-authored-by: Gavin-Niederman <[email protected]>
Co-authored-by: Yuechan Li <[email protected]>
Co-authored-by: Gracelu128 <[email protected]>
Co-authored-by: Richard Li <[email protected]>
Co-authored-by: THERocky <[email protected]>
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.

4 participants