NoSloppy

Untitled

Jan 5th, 2021
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. // These Accent LED styles are meant to re-create the deleted cave scene in ROTJ.
  2. //
  3. // When saber is off, Green blink 9 times (18 bits) then is off for 6 blinks (12 bits)
  4. // When saber is on, Green stays lit
  5. // When saber is off, Red remains off for 9 blinks (18 bits) then is on for 6 blinks (12 bits)
  6. // When saber is on, Red //turns off//Blinks//pulse depending on which you have uncommented.
  7.  
  8. // Red Arrow Pulses when blade is ON
  9. // StylePtr<InOutHelper<Pulsing<Black,White,3000>, 1, 1, Sequence<White, Black, 200, 30, 0b0000000000000000,0b0010101010101000>>>(),
  10. // Red Arrow is OFF when blade is ON
  11. // StylePtr<InOutHelper<Black, 1, 1, Sequence<White, Black, 200, 30, 0b0000000000000000,0b0010101010101000>>>(),
  12. // Red Arrow Blinks when blade is ON
  13. StylePtr<InOutHelper<Blinking<Black,Rgb<130,130,130>,1500,500>, 1, 1, Sequence<Rgb<130,130,130>, Black, 200, 30, 0b0000000000000000,0b0010101010101000>>>(),
  14. // Green Arrow
  15. StylePtr<InOutHelper<Rgb<85,85,85>, 1, 1, Sequence<Rgb<85,85,85>, Black, 200, 30, 0b1010101010101010,0b1000000000000000>>>()
  16.  
  17.  
  18. struct AccentsLED {
  19. static constexpr float MaxAmps = 0.02;
  20. static constexpr float MaxVolts = 3.2;
  21. static constexpr float P2Amps = 0.10;
  22. static constexpr float P2Volts = 3.0;
  23. static constexpr float R = 0; // Resistor value
  24. static const int Red = 255;
  25. static const int Green = 255;
  26. static const int Blue = 255;
  27. };
  28.  
  29.  
  30. BladeConfig blades[] = {
  31.  
  32. { 0, // 264 pixel KR_Pixel_Stick
  33. //WS281XBladePtr<123, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>,DefaultPinClass, 900000 >(), // HiltPCB and Main Blade in parallel
  34. SubBladeWithStride (0, 262, 2, WS281XBladePtr<264, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >() ), // HiltPCB and KR_Pixel_Stick Main Blade in parallel
  35. SubBladeWithStride (1, 263, 2, NULL),
  36. WS281XBladePtr<5, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), // ChassisPCB
  37. SubBlade (4, 7, WS281XBladePtr<8, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >() ), // Chamber Top
  38. SubBlade (0, 3, NULL), // Chamber Bottom
  39. SimpleBladePtr<AccentsLED, NoLED, NoLED, NoLED, bladePowerPin5, -1, -1, -1>(), // Red Arrow
  40. SimpleBladePtr<AccentsLED, NoLED, NoLED, NoLED, bladePowerPin6, -1, -1, -1>(), // Green Arrow
  41. CONFIGARRAY(KR_Pixel_Stick),
  42. "01_KR_Pixel_Stick", },
Advertisement
Add Comment
Please, Sign In to add comment