|
2025-Robot
Robot code for 2025 FRC season by Argos, FRC team #1756
|
Functions | |
| Animation | Pong (unsigned offset, unsigned width, unsigned height, unsigned ballSize, bool rainbow, frc::AddressableLED::LEDData ballColor, frc::AddressableLED::LEDData backgroundColor, units::millisecond_t frameTime, argos_lib::led::PanelScanParams scanParams) |
| Animation that kind of works like a DVD player screensaver (https://youtu.be/QOtuX0jL85Y). A ball bounces around the panel changing color. | |
| AnimatedSprite | ChompingPacMan (float radius, frc::AddressableLED::LEDData color, units::degree_t direction, units::millisecond_t chompPeriod, bool feathered=false) |
| AnimatedSprite | DyingPacMan (float radius, frc::AddressableLED::LEDData color, units::degree_t direction, units::degree_t initialMouthAngle, units::millisecond_t animationTime, bool feathered=false) |
| Animation | PacManPacing (unsigned offset, unsigned width, unsigned height, bool rainbow, frc::AddressableLED::LEDData pacManColor, argos_lib::led::PrimaryScanDirection paceDirection, units::millisecond_t chompPeriod, units::millisecond_t moveSpeed, argos_lib::led::PanelScanParams scanParams, bool feathered=false) |
| void | DrawRectangle (Panel &dest, unsigned rectWidth, unsigned rectHeight, float x, float y, frc::AddressableLED::LEDData color) |
| Draws an axis-aligned rectangle to a panel. All pixels outside the rectangle are unmodified. | |
| void | DrawCircle (Panel &dest, float radius, float x, float y, frc::AddressableLED::LEDData color, bool feathered=false) |
| Draw a circle to the panel. | |
| Sprite | DrawCircleSprite (float radius, frc::AddressableLED::LEDData color, bool feathered=false) |
| Generate a sprite containing a circle with transparent background. | |
| void | RenderSprite (Panel &dest, const Sprite &sprite, float x, float y, float alpha=1.0) |
| Draw a sprite centered at a point to a panel. This will align the sprite to the nearest pixel alignment on the panel. | |
| Sprite | DrawPacMan (float radius, frc::AddressableLED::LEDData color, units::degree_t direction, units::degree_t mouthAngle, bool feathered=false) |
| Generate PacMan sprite :D. | |
| argos_lib::led::AnimatedSprite argos_lib::led::animation::ChompingPacMan | ( | float | radius, |
| frc::AddressableLED::LEDData | color, | ||
| units::degree_t | direction, | ||
| units::millisecond_t | chompPeriod, | ||
| bool | feathered = false ) |
| void argos_lib::led::animation::DrawCircle | ( | Panel & | dest, |
| float | radius, | ||
| float | x, | ||
| float | y, | ||
| frc::AddressableLED::LEDData | color, | ||
| bool | feathered = false ) |
Draw a circle to the panel.
| dest | Panel to draw to |
| float | radius |
| x | Horizontal center |
| y | Vertical center |
| color | Fill color |
| feathered | When true, make border pixels semi-transparent to soften edge |
| argos_lib::led::Sprite argos_lib::led::animation::DrawCircleSprite | ( | float | radius, |
| frc::AddressableLED::LEDData | color, | ||
| bool | feathered = false ) |
Generate a sprite containing a circle with transparent background.
| radius | Radius in pixels |
| color | Fill color |
| feathered | When true, make border pixels semi-transparent to soften edge |
| argos_lib::led::Sprite argos_lib::led::animation::DrawPacMan | ( | float | radius, |
| frc::AddressableLED::LEDData | color, | ||
| units::degree_t | direction, | ||
| units::degree_t | mouthAngle, | ||
| bool | feathered = false ) |
Generate PacMan sprite :D.
| radius | Radius of our fearless hero |
| color | Why does he have to be yellow? |
| direction | Mouth direction |
| mouthAngle | Jaw separation angle from mandible to palate |
| feathered | When true, make border pixels semi-transparent to soften edge |
| void argos_lib::led::animation::DrawRectangle | ( | Panel & | dest, |
| unsigned | rectWidth, | ||
| unsigned | rectHeight, | ||
| float | x, | ||
| float | y, | ||
| frc::AddressableLED::LEDData | color ) |
Draws an axis-aligned rectangle to a panel. All pixels outside the rectangle are unmodified.
| dest | Panel to draw to |
| rectWidth | Width of rectangle in pixels |
| rectHeight | Height of rectangle in pixels |
| x | Rectangle center x coordinate |
| y | Rectangle center y coordinate |
| color | Color of drawn rectangle |
| argos_lib::led::AnimatedSprite argos_lib::led::animation::DyingPacMan | ( | float | radius, |
| frc::AddressableLED::LEDData | color, | ||
| units::degree_t | direction, | ||
| units::degree_t | initialMouthAngle, | ||
| units::millisecond_t | animationTime, | ||
| bool | feathered = false ) |
| argos_lib::led::Animation argos_lib::led::animation::PacManPacing | ( | unsigned | offset, |
| unsigned | width, | ||
| unsigned | height, | ||
| bool | rainbow, | ||
| frc::AddressableLED::LEDData | pacManColor, | ||
| argos_lib::led::PrimaryScanDirection | paceDirection, | ||
| units::millisecond_t | chompPeriod, | ||
| units::millisecond_t | moveSpeed, | ||
| argos_lib::led::PanelScanParams | scanParams, | ||
| bool | feathered = false ) |
| argos_lib::led::Animation argos_lib::led::animation::Pong | ( | unsigned | offset, |
| unsigned | width, | ||
| unsigned | height, | ||
| unsigned | ballSize, | ||
| bool | rainbow, | ||
| frc::AddressableLED::LEDData | ballColor, | ||
| frc::AddressableLED::LEDData | backgroundColor, | ||
| units::millisecond_t | frameTime, | ||
| argos_lib::led::PanelScanParams | scanParams ) |
Animation that kind of works like a DVD player screensaver (https://youtu.be/QOtuX0jL85Y). A ball bounces around the panel changing color.
| offset | Address of first LED in controlled panel |
| width | Width of panel in pixels |
| height | Height of panel in pixels |
| ballSize | Width and height of ball in pixels (it's a square... a circle would basically be the same at this size and I'm lazy) |
| rainbow | When true, ball changes to a random hue on every bounce! |
| ballColor | Initial color of the bouncing ball |
| backgroundColor | Background color behind the ball |
| frameTime | Time for ball to travel one pixel distance |
| scanParams | Parameters controlling the serialization of the internal panel to pixel addresses |
| void argos_lib::led::animation::RenderSprite | ( | Panel & | dest, |
| const Sprite & | sprite, | ||
| float | x, | ||
| float | y, | ||
| float | alpha = 1.0 ) |
Draw a sprite centered at a point to a panel. This will align the sprite to the nearest pixel alignment on the panel.
| dest | Panel to draw to |
| sprite | Sprite to draw |
| x | Horizontal center |
| y | Vertical center |
| alpha | Global sprite transparency where 0 is fully transparent and 1 is fully opaque |