This commit is contained in:
@@ -31,7 +31,7 @@ public class Algue_inspire extends Command {
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
if(pince.emperagealgue()>60){
|
||||
if(pince.emperagealgue()>90){
|
||||
pince.aspirealgue(0);
|
||||
bougie.Bleu();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class CoralExpire extends Command {
|
||||
}
|
||||
*/
|
||||
pince.aspirecoral(-.5);
|
||||
bougie.Jaune();
|
||||
bougie.Rouge();
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
||||
@@ -14,20 +14,46 @@ public class Bougie extends SubsystemBase {
|
||||
CANdle candle = new CANdle(23);
|
||||
CANdleConfiguration config = new CANdleConfiguration();
|
||||
RainbowAnimation rainbowAnim = new RainbowAnimation(1, 0.5, 68);
|
||||
int led = 16;
|
||||
int led2 = 8;
|
||||
boolean x =true;
|
||||
/** Creates a new Bougie. */
|
||||
public Bougie() {
|
||||
config.brightnessScalar = 0.5;
|
||||
candle.configAllSettings(config);
|
||||
}
|
||||
public void Rouge() {
|
||||
candle.setLEDs(255, 0, 0,0,8,8);
|
||||
candle.setLEDs(255, 0, 0,0,24,8);
|
||||
candle.setLEDs(255, 0, 0,0,40,8);
|
||||
candle.setLEDs(255, 0, 0,0,56,8);
|
||||
candle.setLEDs(255, 0, 0,0,72,8);
|
||||
candle.setLEDs(255, 0, 0,0,88,8);
|
||||
candle.setLEDs(255, 0, 0,0,104,8);
|
||||
candle.setLEDs(255, 0, 0,0,120,8);
|
||||
if(x){
|
||||
candle.setLEDs(255, 0, 0,0,led,8);
|
||||
led++;
|
||||
candle.setLEDs(0, 0, 0,0,led2,8);
|
||||
led2++;
|
||||
System.out.println("led monte");
|
||||
System.out.println(led);
|
||||
if(led>=68){
|
||||
x=false;
|
||||
System.out.println("true");
|
||||
System.out.println(x);
|
||||
}
|
||||
}
|
||||
if(!x){
|
||||
candle.setLEDs(255, 0, 0,0,led2,8);
|
||||
led2--;
|
||||
candle.setLEDs(0, 0, 0,0,led,8);
|
||||
led--;
|
||||
System.out.println("leds descendent");
|
||||
|
||||
if(led==15){
|
||||
x=true;
|
||||
System.out.println("false");
|
||||
}}
|
||||
// candle.setLEDs(255, 0, 0,0,24,8);
|
||||
// candle.setLEDs(255, 0, 0,0,40,8);
|
||||
// candle.setLEDs(255, 0, 0,0,56,8);
|
||||
// candle.setLEDs(255, 0, 0,0,72,8);
|
||||
// candle.setLEDs(255, 0, 0,0,88,8);
|
||||
// candle.setLEDs(255, 0, 0,0,104,8);
|
||||
// candle.setLEDs(255, 0, 0,0,120,8);
|
||||
}
|
||||
public void Vert() {
|
||||
candle.setLEDs(0, 255, 0,0,8,8);
|
||||
|
||||
Reference in New Issue
Block a user