2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
animiation.h File Reference
#include <argos_lib/led/panel.h>
#include <frc/AddressableLED.h>
#include <units/angle.h>
#include <units/time.h>
#include <algorithm>
#include <functional>

Go to the source code of this file.

Classes

struct  argos_lib::led::Animation
 A representation of a custom LED animation. More...
 
struct  argos_lib::led::Sprite
 https://en.wikipedia.org/wiki/Sprite_(computer_graphics) More...
 

Namespaces

namespace  argos_lib
 
namespace  argos_lib::led
 
namespace  argos_lib::led::animation
 

Typedefs

using argos_lib::led::AnimatedSprite = std::function< Sprite()>
 Callable to get dynamic sprite.
 

Functions

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.
 
AnimatedSprite argos_lib::led::animation::ChompingPacMan (float radius, frc::AddressableLED::LEDData color, units::degree_t direction, units::millisecond_t chompPeriod, bool feathered=false)
 
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)
 
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)
 
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.
 
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.
 
Sprite argos_lib::led::animation::DrawCircleSprite (float radius, frc::AddressableLED::LEDData color, bool feathered=false)
 Generate a sprite containing a circle with transparent background.
 
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.
 
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.