001/* Copyright (C) Cross The Road Electronics 2024 */ 002package com.ctre.phoenix.led; 003 004/** 005 * Animation that strobes the LEDs a specified color 006 */ 007public class StrobeAnimation extends BaseTwoSizeAnimation { 008 /** 009 * Constructor for a StrobeAnimation 010 * @param r How much red should the color have [0, 255] 011 * @param g How much green should the color have [0, 255] 012 * @param b How much blue should the color have [0, 255] 013 * @param w How much white should the color have [0, 255] 014 * @param speed How fast should the color travel the strip [0, 1] 015 * @param numLed How many LEDs the CANdle controls 016 * @param ledOffset Where to start the animation 017 */ 018 public StrobeAnimation(int r, int g, int b, int w, double speed, int numLed, int ledOffset) { 019 super(0x66, r, g, b, w, speed, numLed, 0, 0, ledOffset); 020 } 021 /** 022 * Constructor for a StrobeAnimation 023 * @param r How much red should the color have [0, 255] 024 * @param g How much green should the color have [0, 255] 025 * @param b How much blue should the color have [0, 255] 026 * @param w How much white should the color have [0, 255] 027 * @param speed How fast should the color travel the strip [0, 1] 028 * @param numLed How many LEDs the CANdle controls 029 */ 030 public StrobeAnimation(int r, int g, int b, int w, double speed, int numLed) { 031 this(r, g, b, w, speed, numLed, 0); 032 } 033 /** 034 * Constructor for a StrobeAnimation 035 * @param r How much red should the color have [0, 255] 036 * @param g How much green should the color have [0, 255] 037 * @param b How much blue should the color have [0, 255] 038 */ 039 public StrobeAnimation(int r, int g, int b) { 040 this(r, g, b, 0, 1, -1, 0); 041 } 042}