8#include <frc/AddressableLED.h>
9#include <units/angle.h>
10#include <units/time.h>
73 frc::AddressableLED::LEDData ballColor,
74 frc::AddressableLED::LEDData backgroundColor,
75 units::millisecond_t frameTime,
79 frc::AddressableLED::LEDData color,
80 units::degree_t direction,
81 units::millisecond_t chompPeriod,
82 bool feathered =
false);
84 frc::AddressableLED::LEDData color,
85 units::degree_t direction,
86 units::degree_t initialMouthAngle,
87 units::millisecond_t animationTime,
88 bool feathered =
false);
94 frc::AddressableLED::LEDData pacManColor,
96 units::millisecond_t chompPeriod,
97 units::millisecond_t moveSpeed,
99 bool feathered =
false);
112 Panel& dest,
unsigned rectWidth,
unsigned rectHeight,
float x,
float y, frc::AddressableLED::LEDData color);
125 Panel& dest,
float radius,
float x,
float y, frc::AddressableLED::LEDData color,
bool feathered =
false);
160 frc::AddressableLED::LEDData color,
161 units::degree_t direction,
162 units::degree_t mouthAngle,
163 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)
Definition animation.cpp:149
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)....
Definition animation.cpp:16
void DrawCircle(Panel &dest, float radius, float x, float y, frc::AddressableLED::LEDData color, bool feathered=false)
Draw a circle to the panel.
Definition animation.cpp:368
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.
Definition animation.cpp:354
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 alignme...
Definition animation.cpp:402
Sprite DrawPacMan(float radius, frc::AddressableLED::LEDData color, units::degree_t direction, units::degree_t mouthAngle, bool feathered=false)
Generate PacMan sprite :D.
Definition animation.cpp:426
AnimatedSprite DyingPacMan(float radius, frc::AddressableLED::LEDData color, units::degree_t direction, units::degree_t initialMouthAngle, units::millisecond_t animationTime, bool feathered=false)
Definition animation.cpp:123
Sprite DrawCircleSprite(float radius, frc::AddressableLED::LEDData color, bool feathered=false)
Generate a sprite containing a circle with transparent background.
Definition animation.cpp:374
AnimatedSprite ChompingPacMan(float radius, frc::AddressableLED::LEDData color, units::degree_t direction, units::millisecond_t chompPeriod, bool feathered=false)
Definition animation.cpp:107
PrimaryScanDirection
When representing a panel as a strip, sequential addresses are in this direction. Note that the actua...
Definition panel.h:99
std::function< Sprite()> AnimatedSprite
Callable to get dynamic sprite.
Definition animiation.h:49
std::vector< frc::AddressableLED::LEDData > Strip
A strip of LEDs.
Definition panel.h:91
Definition swap_controllers_command.h:12
A representation of a custom LED animation.
Definition animiation.h:20
std::function< Strip()> update
This function can be any callable that returns a sequence of LED colors.
Definition animiation.h:36
unsigned offset
Address of first LED.
Definition animiation.h:38
unsigned numLEDs
Number of LEDs in the animation.
Definition animiation.h:37
Animation()=delete
Delete default constructor because it is meaningless.
Animation(std::function< Strip()> update, unsigned numLEDs, unsigned offset)
Construct a new Animation object.
Definition animiation.h:33
https://en.wikipedia.org/wiki/Sprite_(computer_graphics)
Definition animiation.h:44
Mask alpha
Per-pixel transparency.
Definition animiation.h:46
Panel colors
Colors of the sprite.
Definition animiation.h:45