C
C#9mo ago
rhobiusvoid

Steel Battalion controller lights

Hello. I need some help figuring out how to do one of two things with my Steel Battalion controller. The program I use has c# scripts to enumerate buttons and axes, but I can't seem to figure out how to get the controller lights to either 1) breathe gently, using a value range of 0 to 3 2) light up gradually from 0 to 15 (max light value) when pressed, then 15 to 0 when released
2 Replies
rhobiusvoid
rhobiusvoidOP9mo ago
the code block responsible for this is as follows
c#
public void Initialize()
{

int baseLineIntensity = 1;//just an average value for LED intensity
int maxLineIntensity = 15;//max light intensity
int emergencyLightIntensity = 15;//for stuff like eject,cockpit Hatch,Ignition, and Start

controller = new SteelBattalionController();
controller.Init(1);//50 is refresh rate in milliseconds
//set all buttons by default to light up only when you press them down

for (int i = 4; i < 4 + 30; i++)
{
if (i != (int)ButtonEnum.Eject)//excluding eject since we are going to flash that one
controller.AddButtonLightMapping((ButtonEnum)(i - 1), (ControllerLEDEnum)(i), true, baseLineIntensity);
}
c#
public void Initialize()
{

int baseLineIntensity = 1;//just an average value for LED intensity
int maxLineIntensity = 15;//max light intensity
int emergencyLightIntensity = 15;//for stuff like eject,cockpit Hatch,Ignition, and Start

controller = new SteelBattalionController();
controller.Init(1);//50 is refresh rate in milliseconds
//set all buttons by default to light up only when you press them down

for (int i = 4; i < 4 + 30; i++)
{
if (i != (int)ButtonEnum.Eject)//excluding eject since we are going to flash that one
controller.AddButtonLightMapping((ButtonEnum)(i - 1), (ControllerLEDEnum)(i), true, baseLineIntensity);
}
what do I need to add for breathing, and/or for the gradual light?
rhobiusvoid
rhobiusvoidOP9mo ago
here's also the .cs file itself
Want results from more Discord servers?
Add your server