cleanup, add copyright notice to LightsDriver_LinuxWeedTech.cpp
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
REGISTER_SOUND_DRIVER_CLASS(LinuxWeedTech);
|
REGISTER_SOUND_DRIVER_CLASS(LinuxWeedTech);
|
||||||
|
|
||||||
// Begin serial driver //
|
// Begin serial driver
|
||||||
static int fd = -1;
|
static int fd = -1;
|
||||||
static LightsState CurLights;
|
static LightsState CurLights;
|
||||||
|
|
||||||
@@ -65,9 +65,7 @@ static inline void SerialOpen()
|
|||||||
}
|
}
|
||||||
// End serial driver //
|
// End serial driver //
|
||||||
|
|
||||||
|
/* Module maps (Dance mode)
|
||||||
|
|
||||||
/* Module maps
|
|
||||||
MODULE #A
|
MODULE #A
|
||||||
Channel A: Marquee (Up-Left)
|
Channel A: Marquee (Up-Left)
|
||||||
Channel B: Marquee (Up-Right)
|
Channel B: Marquee (Up-Right)
|
||||||
@@ -101,7 +99,6 @@ static inline void SerialOpen()
|
|||||||
Channel N: <not used>
|
Channel N: <not used>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
LightsDriver_LinuxWeedTech::LightsDriver_LinuxWeedTech()
|
LightsDriver_LinuxWeedTech::LightsDriver_LinuxWeedTech()
|
||||||
{
|
{
|
||||||
// Open port
|
// Open port
|
||||||
@@ -178,7 +175,6 @@ void LightsDriver_LinuxWeedTech::Set( const LightsState *ls )
|
|||||||
else if(cl == LIGHT_BASS_LEFT) {str[0] = 'A'; str[2] = 'G';}
|
else if(cl == LIGHT_BASS_LEFT) {str[0] = 'A'; str[2] = 'G';}
|
||||||
else if(cl == LIGHT_BASS_RIGHT) {str[0] = 'A'; str[2] = 'H';}
|
else if(cl == LIGHT_BASS_RIGHT) {str[0] = 'A'; str[2] = 'H';}
|
||||||
|
|
||||||
|
|
||||||
if( bOn )
|
if( bOn )
|
||||||
str[1]='L';
|
str[1]='L';
|
||||||
else
|
else
|
||||||
@@ -204,22 +200,19 @@ void LightsDriver_LinuxWeedTech::Set( const LightsState *ls )
|
|||||||
if(gc == GameController_1) {
|
if(gc == GameController_1) {
|
||||||
if(gb == DANCE_BUTTON_LEFT) {str[0] = 'A'; str[2] = 'I';}
|
if(gb == DANCE_BUTTON_LEFT) {str[0] = 'A'; str[2] = 'I';}
|
||||||
if(gb == DANCE_BUTTON_RIGHT) {str[0] = 'A'; str[2] = 'J';}
|
if(gb == DANCE_BUTTON_RIGHT) {str[0] = 'A'; str[2] = 'J';}
|
||||||
if(gb == DANCE_BUTTON_UP) {str[0] = 'A'; str[2] = 'K';}
|
if(gb == DANCE_BUTTON_UP) {str[0] = 'A'; str[2] = 'K';}
|
||||||
if(gb == DANCE_BUTTON_DOWN) {str[0] = 'A'; str[2] = 'L';}
|
if(gb == DANCE_BUTTON_DOWN) {str[0] = 'A'; str[2] = 'L';}
|
||||||
if(gb == GAME_BUTTON_START) {str[0] = 'A'; str[2] = 'E';}
|
if(gb == GAME_BUTTON_START) {str[0] = 'A'; str[2] = 'E';}
|
||||||
}
|
}
|
||||||
else if(gc == GameController_2) {
|
else if(gc == GameController_2) {
|
||||||
if(gb == DANCE_BUTTON_LEFT) {str[0] = 'A'; str[2] = 'M';}
|
if(gb == DANCE_BUTTON_LEFT) {str[0] = 'A'; str[2] = 'M';}
|
||||||
if(gb == DANCE_BUTTON_RIGHT) {str[0] = 'A'; str[2] = 'N';}
|
if(gb == DANCE_BUTTON_RIGHT) {str[0] = 'A'; str[2] = 'N';}
|
||||||
if(gb == DANCE_BUTTON_UP) {str[0] = 'B'; str[2] = 'A';}
|
if(gb == DANCE_BUTTON_UP) {str[0] = 'B'; str[2] = 'A';}
|
||||||
if(gb == DANCE_BUTTON_DOWN) {str[0] = 'B'; str[2] = 'B';}
|
if(gb == DANCE_BUTTON_DOWN) {str[0] = 'B'; str[2] = 'B';}
|
||||||
if(gb == GAME_BUTTON_START) {str[0] = 'A'; str[2] = 'F';}
|
if(gb == GAME_BUTTON_START) {str[0] = 'A'; str[2] = 'F';}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bOn )
|
str[1] = bOn ? 'L' : 'H';
|
||||||
str[1]='L';
|
|
||||||
else
|
|
||||||
str[1]='H';
|
|
||||||
|
|
||||||
if( str[0] != 0x00 )
|
if( str[0] != 0x00 )
|
||||||
{
|
{
|
||||||
@@ -230,5 +223,29 @@ void LightsDriver_LinuxWeedTech::Set( const LightsState *ls )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (c) 2003-2004 Kevin Slaughter
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||||
|
* whom the Software is furnished to do so, provided that the above
|
||||||
|
* copyright notice(s) and this permission notice appear in all copies of
|
||||||
|
* the Software and that both the above copyright notice(s) and this
|
||||||
|
* permission notice appear in supporting documentation.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||||
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||||
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||||
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||||
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||||
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
/*
|
/* LightsDriver_LinuxWeedTech: Control lights with WTDIO-M from Weeder Technologies
|
||||||
* LightsDriver_LinuxWeedTech: Control lights with WTDIO-M from Weeder Technologies
|
* http://www.weedtech.com / http://www.weedtech.com/wtdio-m.html */
|
||||||
* http://www.weedtech.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef LightsDriver_LinuxWeedTech_H
|
#ifndef LightsDriver_LinuxWeedTech_H
|
||||||
#define LightsDriver_LinuxWeedTech_H
|
#define LightsDriver_LinuxWeedTech_H
|
||||||
|
|||||||
Reference in New Issue
Block a user