Open CodeMyGame1 opened 6 months ago
For the auton selector, when you press on an autonomous routine, it will expand, showing:
IF POSSIBLE, also have the bot DRAW OUT the auton on the brain screen in real time, as the auton runs!
As a slight addition to this, expand the autonomous selector class to include features shown in this explanation video
As another slight addition to this, display the battery capacity of the battery in a PERCENT value—currently, the battery capacity is displayed on the brain only with a progress bar.
Problem: Both codebases (this off-season one, and our official High Stakes bot repository) do not have an autonomous selector. This means that, in order to run an autonomous routine as of now, you have to manually paste the autonomous routine into the
autonomous()
function inmain.cpp
; this is not practical, and an autonomous selector is much more convenient.Significance: Especially during matches, you will not always start on the near-side / far-side of the field, and it's tedious to push different versions of the code, just to modify the autonomous routine being run, before each match. An autonomous selector simplifies this process immensely.
Solution: Although PROS does have an in-built LLEMU (Legacy LCD Emulator), I feel implementing our own autonomous selector (through the
lvgl
library that comes with PROS) gives us much more freedom—with respect to adding functionality—as well as the ability to customize the appearance of the autonomous selector. As part of solving this issue, we should:AutonSelector
class, that can be instantiated with a list of far-side autonomous routines, near-side autonomous routines, and autonomous routines for the autonomous skills challenge. the autonomous routines will be passed in as key/value pairs in a dictionary; the key will be the name of the autonomous routine, and the value will be the corresponding function that should runlvgl
, three tabs (far side, near side, skills). each tab, when pressed, displays its corresponding button group, with each button representing an autonomous routine that can be run