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

✨Set team number and robot name #219

Merged
merged 3 commits into from
Aug 4, 2022

Conversation

BennyBot
Copy link
Member

@BennyBot BennyBot commented Jun 11, 2022

Summary:

Allows users to set and get their brain's team number and robot name.

Motivation:

Initial release of this feature broke uploading and was promptly removed. This PR adds back the feature without breaking uploading.

Test Plan:

  • Able to set teamnumber and robotname
  • Able to get teamnumber and robotname
  • Doesn't break upload

All of the above are true for me, someone else should test them though.

Copy link
Member

@WillXuCodes WillXuCodes left a comment

Choose a reason for hiding this comment

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

PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 set teamnumber "2469 bad"
Truncating input to meet maximum value length (7 characters).
Value of 'teamnumber' set to : 2469 ba
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 set teamnumber "blrsbad"
Value of 'teamnumber' set to : blrsbad
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 set teamnumber "blrs2"
Value of 'teamnumber' set to : blrs2
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 set teamnumber "91130E"
Value of 'teamnumber' set to : 91130E
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 set teamnumber 91130
Value of 'teamnumber' set to : 91130
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 set teamnumber 91130E
Value of 'teamnumber' set to : 91130E
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 set teamnumber asdfadsfadsfsf
Truncating input to meet maximum value length (7 characters).
Value of 'teamnumber' set to : asdfads
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 set robotname
Usage: pros v5 set [OPTIONS] VARIABLE VALUE

Error: Missing argument "value".
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 set teamname
Usage: pros v5 set [OPTIONS] VARIABLE VALUE

Error: Invalid value for "variable": invalid choice: teamname. (choose from teamnumber, robotname)
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 set robotname "this should be more than 17 chars"
Truncating input to meet maximum value length (16 characters).
Value of 'robotname' set to : this should be m
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 set robotname "this is better"
Value of 'robotname' set to : this is better
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 get robotname
Value of 'robotname' is : this is better
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 get teamname
Usage: pros v5 get [OPTIONS] VARIABLE

Error: Invalid value for "variable": invalid choice: teamname. (choose from teamnumber, robotname)
PS C:\Users\xuzwi\OneDrive\Desktop\repos\BLRS\pros> pros v5 get teamnumber
Value of 'teamnumber' is : asdfads

Also tested uploading, it works. Good to merge in my books.

@BennyBot BennyBot merged commit f57a010 into develop Aug 4, 2022
@kunwarsahni01 kunwarsahni01 mentioned this pull request Aug 24, 2022
kunwarsahni01 added a commit that referenced this pull request Aug 25, 2022
* 🐛 emit correct compiler for C files when generating CDB (#188)

* Update Azure Pipelines with new self hosted M1 Mac (#189)

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Fixes 'make.exe.exe' typo. Adds disable sentry prompt option for VSCode. (#190)

* Fixes 'make.exe.exe' typo. Adds disable sentry prompt option for VSCode.

* Fix sentry-off flag

* change sentry-off to no-sentry

* Update Version (#186) (#191)

* ✨Add Analytics (#193)

* Fix and move no-sentry to default options. Setup framework for analytics

* Fix some things. --toggle-analytics works

* Analytics should be working. Need to figure out which commands matter

* Make use-analytics a choice not a toggle

* Show no-analytics flag feedback so user knows it works

* Analytics appear to be working!

* Reset uid to None

* Compress code a bit

* Remove interactive command analytics. Fix info-project typo

* Move GA config to cli.pros. Fixes --use-analytics

* ✨More Upload Options (#194)

* Start of more upload options

* Adds project icon, name, and description. Use name/description="string"

* pros v5 rm-program command

* rm program literals

* Remove extra print messages. Kernel version = None when no project

* Update Version (#186) (#195)

* Add __init__ file so ga is considered a module (#206)

* Fix issue with programs uploading segfaulting/NACKing/doing nothing (#207)

* ✨Set team number and robot name (#210)

* Adds kv_read and kv_write functions (UNTESTED) to V5Device class

* Add commands to read and set kernel variables

* Add descriptions to set_variable and read_variable commands

* Finish reading kernel variables. Use None for unknown rx length

* Trim kernel variable value and ensure null terminated.

* Move rv and sv to v5 commands

* Working set command. Maximum lengths based on brain's screen space

* get and set aliases

* Add m as an alias for pros make. (#204)

* Cleaned Up CI (#213)

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Revert "✨Set team number and robot name (#210)" (#214)

This reverts commit 62ee4b8.

* ✨Set team number and robot name (#219)

* old code (not working)

* use correct txrx function

* return set value

* ✨Terminal file output (#220)

* Added file redirect click.option to terminal.py

* Got rid of indentation error

* Added code for output

* Redirects standard output stream to file

* Outputs to both terminal and file

* Modified imported modules

* Added line at end

* changes on windows

* Update pros/cli/terminal.py for terminal file output

Co-authored-by: Will Xu <54247087+WillXuCodes@users.noreply.github.com>

* Removed ident error

Co-authored-by: BennyBot <48661356+BennyBot@users.noreply.github.com>

Co-authored-by: Will Xu <xu1321@purdue.edu>
Co-authored-by: Benjamin Davis <davi1561@purdue.edu>
Co-authored-by: Will Xu <54247087+WillXuCodes@users.noreply.github.com>
Co-authored-by: BennyBot <48661356+BennyBot@users.noreply.github.com>

Co-authored-by: Alex Brooke <akb.sbc@gmail.com>
Co-authored-by: BennyBot <48661356+BennyBot@users.noreply.github.com>
Co-authored-by: Benjamin Davis <davi1561@purdue.edu>
Co-authored-by: sharmaneha03 <98361515+sharmaneha03@users.noreply.github.com>
Co-authored-by: Will Xu <xu1321@purdue.edu>
Co-authored-by: Will Xu <54247087+WillXuCodes@users.noreply.github.com>
ayushuk pushed a commit that referenced this pull request Oct 19, 2022
* old code (not working)

* use correct txrx function

* return set value
kunwarsahni01 added a commit that referenced this pull request Nov 14, 2022
* 🐛 emit correct compiler for C files when generating CDB (#188)

* Update Azure Pipelines with new self hosted M1 Mac (#189)

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Fixes 'make.exe.exe' typo. Adds disable sentry prompt option for VSCode. (#190)

* Fixes 'make.exe.exe' typo. Adds disable sentry prompt option for VSCode.

* Fix sentry-off flag

* change sentry-off to no-sentry

* Update Version (#186) (#191)

* ✨Add Analytics (#193)

* Fix and move no-sentry to default options. Setup framework for analytics

* Fix some things. --toggle-analytics works

* Analytics should be working. Need to figure out which commands matter

* Make use-analytics a choice not a toggle

* Show no-analytics flag feedback so user knows it works

* Analytics appear to be working!

* Reset uid to None

* Compress code a bit

* Remove interactive command analytics. Fix info-project typo

* Move GA config to cli.pros. Fixes --use-analytics

* ✨More Upload Options (#194)

* Start of more upload options

* Adds project icon, name, and description. Use name/description="string"

* pros v5 rm-program command

* rm program literals

* Remove extra print messages. Kernel version = None when no project

* Update Version (#186) (#195)

* Add __init__ file so ga is considered a module (#206)

* Fix issue with programs uploading segfaulting/NACKing/doing nothing (#207)

* ✨Set team number and robot name (#210)

* Adds kv_read and kv_write functions (UNTESTED) to V5Device class

* Add commands to read and set kernel variables

* Add descriptions to set_variable and read_variable commands

* Finish reading kernel variables. Use None for unknown rx length

* Trim kernel variable value and ensure null terminated.

* Move rv and sv to v5 commands

* Working set command. Maximum lengths based on brain's screen space

* get and set aliases

* Add m as an alias for pros make. (#204)

* Cleaned Up CI (#213)

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Revert "✨Set team number and robot name (#210)" (#214)

This reverts commit 62ee4b8.

* ✨Set team number and robot name (#219)

* old code (not working)

* use correct txrx function

* return set value

* ✨Terminal file output (#220)

* Added file redirect click.option to terminal.py

* Got rid of indentation error

* Added code for output

* Redirects standard output stream to file

* Outputs to both terminal and file

* Modified imported modules

* Added line at end

* changes on windows

* Update pros/cli/terminal.py for terminal file output

Co-authored-by: Will Xu <54247087+WillXuCodes@users.noreply.github.com>

* Removed ident error

Co-authored-by: BennyBot <48661356+BennyBot@users.noreply.github.com>

Co-authored-by: Will Xu <xu1321@purdue.edu>
Co-authored-by: Benjamin Davis <davi1561@purdue.edu>
Co-authored-by: Will Xu <54247087+WillXuCodes@users.noreply.github.com>
Co-authored-by: BennyBot <48661356+BennyBot@users.noreply.github.com>

* Fix typo in comment

* add FEATURE_REQUEST.md (#230)

* ✨Move Issue Template Files (#231)

* Move Issue Template Files

* Update BUG_REPORT.md

* Create main.yml

* Update main.yml

* Add pyinstaller requirement

* Add .spec file

* Update main.yml

* add universal2 arch

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* attempt fake version number

* Update main.yml

* Update main.yml

* Update main.yml

* version.py exception

* Update main.yml

* Try adding --always and stderr

* remove --always

* fetch tags to prevent name error?

* Add Fetch Depth

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update requirements.txt

* Remove older ci/cd files

* Move to new build constants system

* Basic Import structure for pyinstaller

* Move back to spec file

* Install wheel first

* Correct constant writing

* Remove old Build Constants

* Add wheel building

* Different Name for Wheel Artifact

* Typo

* Codeql Analysis

* Only on dev/master for code scan

* 🔖 Release 3.3.3 (#215)

* 🐛 emit correct compiler for C files when generating CDB (#188)

* Update Azure Pipelines with new self hosted M1 Mac (#189)

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Fixes 'make.exe.exe' typo. Adds disable sentry prompt option for VSCode. (#190)

* Fixes 'make.exe.exe' typo. Adds disable sentry prompt option for VSCode.

* Fix sentry-off flag

* change sentry-off to no-sentry

* Update Version (#186) (#191)

* ✨Add Analytics (#193)

* Fix and move no-sentry to default options. Setup framework for analytics

* Fix some things. --toggle-analytics works

* Analytics should be working. Need to figure out which commands matter

* Make use-analytics a choice not a toggle

* Show no-analytics flag feedback so user knows it works

* Analytics appear to be working!

* Reset uid to None

* Compress code a bit

* Remove interactive command analytics. Fix info-project typo

* Move GA config to cli.pros. Fixes --use-analytics

* ✨More Upload Options (#194)

* Start of more upload options

* Adds project icon, name, and description. Use name/description="string"

* pros v5 rm-program command

* rm program literals

* Remove extra print messages. Kernel version = None when no project

* Update Version (#186) (#195)

* Add __init__ file so ga is considered a module (#206)

* Fix issue with programs uploading segfaulting/NACKing/doing nothing (#207)

* ✨Set team number and robot name (#210)

* Adds kv_read and kv_write functions (UNTESTED) to V5Device class

* Add commands to read and set kernel variables

* Add descriptions to set_variable and read_variable commands

* Finish reading kernel variables. Use None for unknown rx length

* Trim kernel variable value and ensure null terminated.

* Move rv and sv to v5 commands

* Working set command. Maximum lengths based on brain's screen space

* get and set aliases

* Add m as an alias for pros make. (#204)

* Cleaned Up CI (#213)

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Revert "✨Set team number and robot name (#210)" (#214)

This reverts commit 62ee4b8.

* Update Version to 3.3.3

* Update Version to 3.3.3

* Revert kernel variable read/set

Co-authored-by: Kunwar Sahni <kunwar.sahni01@gmail.com>
Co-authored-by: Alex Brooke <akb.sbc@gmail.com>

* ✨Set team number and robot name (#219)

* old code (not working)

* use correct txrx function

* return set value

* ✨Terminal file output (#220)

* Added file redirect click.option to terminal.py

* Got rid of indentation error

* Added code for output

* Redirects standard output stream to file

* Outputs to both terminal and file

* Modified imported modules

* Added line at end

* changes on windows

* Update pros/cli/terminal.py for terminal file output

Co-authored-by: Will Xu <54247087+WillXuCodes@users.noreply.github.com>

* Removed ident error

Co-authored-by: BennyBot <48661356+BennyBot@users.noreply.github.com>

Co-authored-by: Will Xu <xu1321@purdue.edu>
Co-authored-by: Benjamin Davis <davi1561@purdue.edu>
Co-authored-by: Will Xu <54247087+WillXuCodes@users.noreply.github.com>
Co-authored-by: BennyBot <48661356+BennyBot@users.noreply.github.com>

* Fix typo in comment

* add FEATURE_REQUEST.md (#230)

* ✨Move Issue Template Files (#231)

* Move Issue Template Files

* Update BUG_REPORT.md

* ✨ Version Display On Error

* Update main.yml

* Update main.yml

* Revert "Merge branch 'develop' of github.com:purduesigbots/pros-cli into develop"

This reverts commit a3de138, reversing
changes made to d953b0d.

* Revert "Revert "Merge branch 'develop' of github.com:purduesigbots/pros-cli into develop""

This reverts commit 0929e41.

* ✨ Run make clean after uninstall template (#244)

* Run make clean after uninstall temp

* Add flag

* Update version to 3.4.1

Co-authored-by: Kunwar Sahni <kunwar.sahni01@gmail.com>
Co-authored-by: Alex Brooke <akb.sbc@gmail.com>
Co-authored-by: BennyBot <48661356+BennyBot@users.noreply.github.com>
Co-authored-by: Benjamin Davis <davi1561@purdue.edu>
Co-authored-by: sharmaneha03 <98361515+sharmaneha03@users.noreply.github.com>
Co-authored-by: Will Xu <xu1321@purdue.edu>
Co-authored-by: Will Xu <54247087+WillXuCodes@users.noreply.github.com>
Co-authored-by: niu <57331513+omegaStag@users.noreply.github.com>
Co-authored-by: Liam Teale <111480281+SizzinSeal@users.noreply.github.com>
Co-authored-by: AlexHunton2 <alexhunton02@gmail.com>
Co-authored-by: omegaStag <kathyniu2003@gmail.com>
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.

None yet

2 participants