mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
[wpilib] Rename LEDPattern constants to all caps
This commit is contained in:
@@ -297,10 +297,10 @@ LEDPattern LEDPattern::Gradient(GradientType type,
|
||||
auto bufLen = data.size();
|
||||
int ledsPerSegment = 0;
|
||||
switch (type) {
|
||||
case kContinuous:
|
||||
case GradientType::CONTINUOUS:
|
||||
ledsPerSegment = bufLen / numSegments;
|
||||
break;
|
||||
case kDiscontinuous:
|
||||
case GradientType::DISCONTINUOUS:
|
||||
ledsPerSegment = (bufLen - 1) / (numSegments - 1);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -341,19 +341,19 @@ class LEDPattern {
|
||||
std::initializer_list<std::pair<double, wpi::util::Color>> steps);
|
||||
|
||||
/** Types of gradients. */
|
||||
enum GradientType {
|
||||
enum class GradientType {
|
||||
/**
|
||||
* A continuous gradient, where the gradient wraps around to allow for
|
||||
* seamless scrolling effects.
|
||||
*/
|
||||
kContinuous,
|
||||
CONTINUOUS,
|
||||
/**
|
||||
* A discontinuous gradient, where the first pixel is set to the first color
|
||||
* of the gradient and the final pixel is set to the last color of the
|
||||
* gradient. There is no wrapping effect, so scrolling effects will display
|
||||
* an obvious seam.
|
||||
*/
|
||||
kDiscontinuous
|
||||
DISCONTINUOUS
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user