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

Add controller text support #1

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft

Add controller text support #1

wants to merge 27 commits into from

Conversation

PA055
Copy link

@PA055 PA055 commented May 22, 2024

Summary

create a buffer for each line of the screen and on update clear and set text for the first line that's expired, also rumbles work

Motivation

text on the controller is really the only way to give feedback to the driver during a match, rumbles are nice too

Test Plan

Gamepad::Controller controller(pros::E_CONTROLLER_MASTER);
void opcontrol() {
    int i = 0;
	while (true) {
        controller.println(0, std::to_string(++i).c_str(), 50);
        controller.println(1, std::to_string(++i).c_str(), 50);
        controller.println(2, std::to_string(++i).c_str(), 50);
        controller.rumble(".- .- .-");
        pros::delay(10);
    }
}

Download the template for this pull request:

Note

This is auto generated from Add Template to Pull Request

curl -o gamepad@0.0.1+a84efd.zip https://nightly.link/LemLib/Gamepad/actions/artifacts/1722175779.zip;
pros c fetch gamepad@0.0.1+a84efd.zip;
pros c apply gamepad@0.0.1+a84efd;
rm gamepad@0.0.1+a84efd.zip;

@ion098 ion098 self-requested a review May 22, 2024 00:34
include/gamepad/controller.hpp Outdated Show resolved Hide resolved
include/gamepad/controller.hpp Outdated Show resolved Hide resolved
include/gamepad/controller.hpp Outdated Show resolved Hide resolved
include/gamepad/controller.hpp Show resolved Hide resolved
src/gamepad/controller.cpp Outdated Show resolved Hide resolved
src/gamepad/controller.cpp Outdated Show resolved Hide resolved
src/gamepad/controller.cpp Outdated Show resolved Hide resolved
src/gamepad/controller.cpp Outdated Show resolved Hide resolved
src/gamepad/controller.cpp Outdated Show resolved Hide resolved
include/gamepad/controller.hpp Outdated Show resolved Hide resolved
ion098
ion098 previously approved these changes May 23, 2024
@ion098 ion098 requested a review from Aang099 May 23, 2024 16:51
src/gamepad/controller.cpp Outdated Show resolved Hide resolved
@ion098 ion098 dismissed their stale review June 2, 2024 19:13

API needs reworking

@ion098 ion098 marked this pull request as draft June 2, 2024 19:13
@PA055 PA055 marked this pull request as ready for review June 4, 2024 22:12
@PA055 PA055 marked this pull request as draft July 8, 2024 21:51
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