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

✨Increasing the Max String Size on the Controller Display #222

Merged
merged 4 commits into from
Jul 16, 2020

Conversation

WillXuCodes
Copy link
Member

@WillXuCodes WillXuCodes commented Jul 7, 2020

Summary:

VCS and RMS have had their controller max string sizes at 19 for a while, and PROS also having this wouldn't be too hard of a change. This was done by changing `CONTROLLER_MAX_COLS` under `src/devices/controller.c` to 19.

Motivation:

There was an issue opened by @djava requesting that we do this, but the discussion surround this died pretty suddenly so I decided to open a PR regarding this to restart the conversation
References (optional):

fixes #217

Test Plan:

  • Build and Upload to a robot with a 19 character display, see if it shows up.

@WillXuCodes WillXuCodes added p: low Low priority enhancement This builds on top of an existing feature labels Jul 7, 2020
@WillXuCodes WillXuCodes linked an issue Jul 7, 2020 that may be closed by this pull request
@kunwarsahni01
Copy link
Member

LGTM image

@nathan-moore
Copy link
Member

nathan-moore commented Jul 7, 2020

You'll probably have to increase this line

static const char* clear = " ";

Probably should make sure all the clears work correctly (including the fallback for the screen clear).

Btw, I edited the post to reference the issue correctly.

@djava
Copy link
Contributor

djava commented Jul 7, 2020

Seems worth a try at least putting it to like 50 and and just filling it with I's.
It's probably a VexOS limit at 19 if that's what RMS does but not necessarily

@WillXuCodes
Copy link
Member Author

Somebody with a controller could probably try that, but for pros itself the 19 limit seems reasonable given the small amount of space left with the 19 character word in the test case.

@kunwarsahni01
Copy link
Member

I tried increasing it to 20, the max number of characters that the controller will display is 19.

nathan-moore
nathan-moore previously approved these changes Jul 8, 2020
Copy link
Member

@nathan-moore nathan-moore left a comment

Choose a reason for hiding this comment

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

LGTM baring some additional testing around clearing. If you want to be though, you could test line clearing and both versions of screen clearing still work. Consider adding that assert, as it makes finding this dependency easier.

the future and we forget to change the clear string.
@WillXuCodes WillXuCodes requested a review from nathan-moore July 10, 2020 03:48
Copy link
Member

@nathan-moore nathan-moore left a comment

Choose a reason for hiding this comment

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

LGTM baring some additional testing around clearing. If you want to be thorough, you could test line clearing and both versions of screen clearing still work.

WillXuCodes added a commit that referenced this pull request Jul 15, 2020
increasing the max size of the controller display.
@WillXuCodes WillXuCodes merged commit 7862fc5 into develop Jul 16, 2020
@HotelCalifornia HotelCalifornia deleted the increase-char branch September 13, 2020 07:38
@kunwarsahni01 kunwarsahni01 mentioned this pull request Sep 13, 2020
WillXuCodes added a commit that referenced this pull request Jun 3, 2022
* Added inline namespaces as detailed in issue #223 (Branch is WIP)

* Added ADI namespace, and backwards compatibility for the reorganized ADI
namespaces.

* Removed ADI from a constructor header.

* Added v5 namespace to controller.

* Changed the v5 namespace properly to v5

* Moved backwards compatibility to area after the adi classes were
defined.

* Removed code related to pull request #222 and issue #217 related to
increasing the max size of the controller display.

* Added a better comments

* Added accidentally deleted class declaration

* Named port correctly

* Deleted extraneous port class declaration

* Removed ADI in ADIDigitalOut

* Updated comments

* Fixed compilation error

* Fixed version

* Fix version numbers

* Minor formatting

* Added new sensors to v5 namespace

* Revert Version File

* Update vdml_adi.cpp

Co-authored-by: AyushShukla3 <[email protected]>
WillXuCodes added a commit that referenced this pull request Jun 11, 2022
* Added inline namespaces as detailed in issue #223 (Branch is WIP)

* Added ADI namespace, and backwards compatibility for the reorganized ADI
namespaces.

* Removed ADI from a constructor header.

* Added v5 namespace to controller.

* Changed the v5 namespace properly to v5

* Moved backwards compatibility to area after the adi classes were
defined.

* Removed code related to pull request #222 and issue #217 related to
increasing the max size of the controller display.

* Added a better comments

* Added accidentally deleted class declaration

* Named port correctly

* Deleted extraneous port class declaration

* Removed ADI in ADIDigitalOut

* Updated comments

* Fixed compilation error

* Fixed version

* Fix version numbers

* Minor formatting

* Added new sensors to v5 namespace

* Revert Version File

* Update vdml_adi.cpp

Co-authored-by: AyushShukla3 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This builds on top of an existing feature p: low Low priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Controller screen character limit is lower than necessary
4 participants