cleanup
This commit is contained in:
@@ -33,24 +33,20 @@ void LightsDriver_LinuxParallel::Set( const LightsState *ls )
|
|||||||
{
|
{
|
||||||
// Set LightState to port
|
// Set LightState to port
|
||||||
CString s;
|
CString s;
|
||||||
unsigned char output;
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
// Prepare Screen Output too for debugging
|
// Prepare Screen Output too for debugging
|
||||||
s += "LinuxParallel Lights Driver Debug\n";
|
s += "LinuxParallel Lights Driver Debug\n";
|
||||||
s += "Lights Mode: " + LightsModeToString(LIGHTSMAN->GetLightsMode()) + "\n";
|
s += "Lights Mode: " + LightsModeToString(LIGHTSMAN->GetLightsMode()) + "\n";
|
||||||
|
|
||||||
// Cabinet Lights
|
// Cabinet Lights
|
||||||
i = 0;
|
int i = 0;
|
||||||
output = 0;
|
unsigned char output = 0;
|
||||||
s += "Cabinet Bits: ";
|
s += "Cabinet Bits: ";
|
||||||
FOREACH_CabinetLight( cl )
|
FOREACH_CabinetLight( cl )
|
||||||
{
|
{
|
||||||
s += ls->m_bCabinetLights[cl] ? '1' : '0';
|
s += ls->m_bCabinetLights[cl] ? '1' : '0';
|
||||||
if ( ls->m_bCabinetLights[cl] )
|
if ( ls->m_bCabinetLights[cl] )
|
||||||
{
|
|
||||||
output += (unsigned char)pow((double)2,i);
|
output += (unsigned char)pow((double)2,i);
|
||||||
}
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
s += "\n";
|
s += "\n";
|
||||||
@@ -60,15 +56,14 @@ void LightsDriver_LinuxParallel::Set( const LightsState *ls )
|
|||||||
{
|
{
|
||||||
s += ssprintf("Controller%d Bits: ",gc+1);
|
s += ssprintf("Controller%d Bits: ",gc+1);
|
||||||
for( int gb=0; gb<iNumGameButtonsToShow; gb++ )
|
for( int gb=0; gb<iNumGameButtonsToShow; gb++ )
|
||||||
{
|
|
||||||
s += ls->m_bGameButtonLights[gc][gb] ? '1' : '0';
|
s += ls->m_bGameButtonLights[gc][gb] ? '1' : '0';
|
||||||
}
|
|
||||||
s += "\n";
|
s += "\n";
|
||||||
}
|
}
|
||||||
s += ssprintf("Output Port: 0x%x\n", PORT_ADDRESS);
|
s += ssprintf("Output Port: 0x%x\n", PORT_ADDRESS);
|
||||||
s += ssprintf("Output Byte: %i\n", output);
|
s += ssprintf("Output Byte: %i\n", output);
|
||||||
|
|
||||||
if ( SCREEN_DEBUG ) { SCREENMAN->SystemMessageNoAnimate( s ); }
|
if( SCREEN_DEBUG )
|
||||||
|
SCREENMAN->SystemMessageNoAnimate( s );
|
||||||
|
|
||||||
// Send byte to port
|
// Send byte to port
|
||||||
outb( output, PORT_ADDRESS );
|
outb( output, PORT_ADDRESS );
|
||||||
|
|||||||
Reference in New Issue
Block a user