Skip to content

Feat/numlaps#213

Open
tuas-travis-ci wants to merge 8 commits intomasterfrom
feat/numlaps
Open

Feat/numlaps#213
tuas-travis-ci wants to merge 8 commits intomasterfrom
feat/numlaps

Conversation

@tuas-travis-ci
Copy link
Copy Markdown
Contributor

@tuas-travis-ci tuas-travis-ci commented Apr 14, 2026

Corresponding PR: tritonuas/obcpp#357

Added a new display on the left sidebar of the control page, displays the current lap as well as the total laps.

Fetches from obcstate containing both the information of tickstate and laps, and splits the information accordingly.
If there is an issue or an error with tickstate, there will likely be an issue with numlaps as well.

@tuas-travis-ci
Copy link
Copy Markdown
Contributor Author

@JaydenBLi This PR is good to go but can you rebase the branch so it can merge to main.

@tuas-travis-ci tuas-travis-ci marked this pull request as ready for review April 14, 2026 20:52
Comment thread houston/src/pages/Control.tsx Outdated
@JaydenBLi JaydenBLi requested a review from AskewParity April 17, 2026 01:23
setNumLaps(data.split(",")[1]);
}
} catch (error) {
console.error("Error fetching tick state:", error);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you delete this console.error (I don't think we care about this if it fails).

const [numLaps, setNumLaps] = useState(67);
//</Garbage that I wrote>

const [numLaps, setNumLaps] = useState("-1");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be initialized to empty string, or keep it consistent with the error message below (change either, I prefer -1).

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.

3 participants