Commit ab4967ce authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

atmo: fix most warnings, convert to Unicode, kill useless functions

parent b0ccf95d
......@@ -75,7 +75,7 @@ CAtmoColorCalculator::~CAtmoColorCalculator(void)
void CAtmoColorCalculator::UpdateParameters()
{
// Zonen Definition neu laden
// diverse Vorberechnungen neu ausfhren
// diverse Vorberechnungen neu ausführen
// Speicherbuffer neu allokieren!
}
......
......@@ -61,7 +61,7 @@ ATMO_BOOL CAtmoClassicConnection::OpenConnection() {
return ATMO_FALSE;
}
/* change serial settings (Speed, stopbits etc.) */
DCB dcb; // fr comport-parameter
DCB dcb; // für comport-parameter
dcb.DCBlength = sizeof(DCB);
GetCommState (m_hComport, &dcb); // ger current serialport settings
dcb.BaudRate = 38400; // set speed
......
......@@ -386,7 +386,7 @@ void CAtmoConfig::UpdateZoneDefinitionCount()
{
if( getZoneCount() != m_AtmoZoneDefCount)
{
// okay zonen anzahl hat sich gendert - wir mssen neu rechnen
// okay zonen anzahl hat sich geändert - wir müssen neu rechnen
// und allokieren!
if(m_ZoneDefinitions)
{
......
......@@ -43,24 +43,27 @@ protected:
public:
CAtmoConnection(CAtmoConfig *cfg);
virtual ~CAtmoConnection(void);
virtual ATMO_BOOL OpenConnection() { return false; }
virtual ATMO_BOOL OpenConnection() = 0;
virtual void CloseConnection() {};
virtual ATMO_BOOL isOpen(void) { return false; }
virtual ATMO_BOOL SendData(pColorPacket data) { return false; }
virtual ATMO_BOOL SendData(pColorPacket data) = 0;
virtual ATMO_BOOL setChannelColor(int channel, tRGBColor color) { return false; }
virtual ATMO_BOOL setChannelValues(int numValues,unsigned char *channel_values) { return false; }
virtual ATMO_BOOL setChannelColor(int /*channel*/, tRGBColor /*color*/)
{ return false; }
virtual ATMO_BOOL setChannelValues(int /*num*/,unsigned char * /*values*/)
{ return false; }
virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
int global_contrast,
int contrast_red,
int contrast_green,
int contrast_blue,
int gamma_red,
int gamma_green,
int gamma_blue,
ATMO_BOOL storeToEeprom) { return false; }
virtual ATMO_BOOL HardwareWhiteAdjust(int /*global_gamma*/,
int /*global_contrast*/,
int /*contrast_red*/,
int /*contrast_green*/,
int /*contrast_blue*/,
int /*gamma_red*/,
int /*gamma_green*/,
int /*gamma_blue*/,
ATMO_BOOL /*storeToEeprom*/)
{ return false; }
#if !defined(_ATMO_VLC_PLUGIN_)
virtual ATMO_BOOL ShowConfigDialog(HINSTANCE hInst, HWND parent, CAtmoConfig *cfg);
......@@ -69,11 +72,12 @@ public:
virtual void SetChannelAssignment(CAtmoChannelAssignment *ca);
virtual int getNumChannels() { return 0; }
virtual char *getChannelName(int ch) { return NULL; }
virtual char *getChannelName(int /*ch*/) { return NULL; }
virtual const char *getDevicePath() { return "none"; }
virtual ATMO_BOOL CreateDefaultMapping(CAtmoChannelAssignment *ca) { return false; }
virtual ATMO_BOOL CreateDefaultMapping(CAtmoChannelAssignment * /*ca*/)
{ return false; }
};
......
......@@ -78,7 +78,7 @@ typedef struct
// maximal Anzahl Kanle... original 5!
// maximal Anzahl Kanäle... original 5!
#define CAP_MAX_NUM_ZONES 64
// only for classic to avoid changing too much code!
// #define ATMO_MAX_NUM_CHANNELS 5
......@@ -116,7 +116,7 @@ enum AtmoConnectionType
actMoMoLight = 6,
actFnordlicht = 7
};
static const char *AtmoDeviceTypes[] = {
static const char AtmoDeviceTypes[8][16] = {
"Atmo-Classic",
"Dummy",
"DMX",
......
......@@ -76,7 +76,7 @@ ATMO_BOOL CAtmoDmxSerialConnection::OpenConnection() {
return ATMO_FALSE;
}
/* change serial settings (Speed, stopbits etc.) */
DCB dcb; // fr comport-parameter
DCB dcb; // für comport-parameter
dcb.DCBlength = sizeof(DCB);
GetCommState (m_hComport, &dcb); // ger current serialport settings
dcb.BaudRate = 115200; // set speed
......@@ -128,19 +128,6 @@ ATMO_BOOL CAtmoDmxSerialConnection::isOpen(void) {
return (m_hComport != INVALID_HANDLE_VALUE);
}
ATMO_BOOL CAtmoDmxSerialConnection::HardwareWhiteAdjust(int global_gamma,
int global_contrast,
int contrast_red,
int contrast_green,
int contrast_blue,
int gamma_red,
int gamma_green,
int gamma_blue,
ATMO_BOOL storeToEeprom) {
return ATMO_FALSE;
}
ATMO_BOOL CAtmoDmxSerialConnection::SendData(pColorPacket data) {
if(m_hComport == INVALID_HANDLE_VALUE)
return ATMO_FALSE;
......
......@@ -44,16 +44,6 @@ class CAtmoDmxSerialConnection : public CAtmoConnection {
virtual ATMO_BOOL SendData(pColorPacket data);
virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
int global_contrast,
int contrast_red,
int contrast_green,
int contrast_blue,
int gamma_red,
int gamma_green,
int gamma_blue,
ATMO_BOOL storeToEeprom);
virtual ATMO_BOOL setChannelColor(int channel, tRGBColor color);
virtual ATMO_BOOL setChannelValues(int numValues,unsigned char *channel_values);
......
......@@ -169,7 +169,7 @@ char *CAtmoDynData::getWorkDir()
void CAtmoDynData::ReloadZoneDefinitionBitmaps()
{
int i;
// suchlogik fr die Bitmaps ...
// suchlogik für die Bitmaps ...
// <WorkDir>\hardware\numchannels\zone..0..n.bmp
// <WorkDir>\hardware\zone..0..n.bmp
// <WorkDir>\zone..0..n.bmp
......
......@@ -58,7 +58,7 @@ HANDLE CAtmoMultiConnection::OpenDevice(char *devName)
return INVALID_HANDLE_VALUE;
}
/* change serial settings (Speed, stopbits etc.) */
DCB dcb; // fr comport-parameter
DCB dcb; // für comport-parameter
dcb.DCBlength = sizeof(DCB);
GetCommState (hComport, &dcb); // ger current serialport settings
dcb.BaudRate = 38400; // set speed
......
......@@ -84,7 +84,7 @@ ATMO_BOOL CFnordlichtConnection::OpenConnection()
return ATMO_FALSE;
}
/* change serial settings (Speed, stopbits etc.) */
DCB dcb; // fr comport-parameter
DCB dcb; // für comport-parameter
dcb.DCBlength = sizeof(DCB);
GetCommState(m_hComport, &dcb); // ger current serialport settings
dcb.BaudRate = 19200; // set speed
......@@ -146,19 +146,6 @@ ATMO_BOOL CFnordlichtConnection::isOpen(void)
return (m_hComport != INVALID_HANDLE_VALUE);
}
ATMO_BOOL CFnordlichtConnection::HardwareWhiteAdjust(int global_gamma,
int global_contrast,
int contrast_red,
int contrast_green,
int contrast_blue,
int gamma_red,
int gamma_green,
int gamma_blue,
ATMO_BOOL storeToEeprom)
{
return ATMO_FALSE; //no hardware adjust required
}
/*
def fade_rgb(addr, r, g, b, step, delay)
$dev.write addr.chr
......
......@@ -62,16 +62,6 @@ class CFnordlichtConnection : public CAtmoConnection
virtual ATMO_BOOL SendData(pColorPacket data);
virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
int global_contrast,
int contrast_red,
int contrast_green,
int contrast_blue,
int gamma_red,
int gamma_green,
int gamma_blue,
ATMO_BOOL storeToEeprom);
virtual int getAmountFnordlichter();
virtual const char *getDevicePath() { return "fnordlicht"; }
......
......@@ -61,7 +61,7 @@ ATMO_BOOL CMoMoConnection::OpenConnection() {
return ATMO_FALSE;
}
/* change serial settings (Speed, stopbits etc.) */
DCB dcb; // fr comport-parameter
DCB dcb; // für comport-parameter
dcb.DCBlength = sizeof(DCB);
GetCommState (m_hComport, &dcb); // ger current serialport settings
dcb.BaudRate = 9600; // set speed
......@@ -113,19 +113,6 @@ ATMO_BOOL CMoMoConnection::isOpen(void) {
return (m_hComport != INVALID_HANDLE_VALUE);
}
ATMO_BOOL CMoMoConnection::HardwareWhiteAdjust(int global_gamma,
int global_contrast,
int contrast_red,
int contrast_green,
int contrast_blue,
int gamma_red,
int gamma_green,
int gamma_blue,
ATMO_BOOL storeToEeprom) {
return ATMO_FALSE;
}
ATMO_BOOL CMoMoConnection::SendData(pColorPacket data) {
if(m_hComport == INVALID_HANDLE_VALUE)
return ATMO_FALSE;
......
......@@ -40,16 +40,6 @@ class CMoMoConnection : public CAtmoConnection {
virtual ATMO_BOOL SendData(pColorPacket data);
virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
int global_contrast,
int contrast_red,
int contrast_green,
int contrast_blue,
int gamma_red,
int gamma_green,
int gamma_blue,
ATMO_BOOL storeToEeprom);
virtual int getNumChannels();
......
This piece of software is based on the software and descriptions mentioned below -
(re)Written by: Igor / Atmo (aka André Weber) - WeberAndre@gmx.de
(re)Written by: Igor / Atmo (aka André Weber) - WeberAndre@gmx.de
Matthiaz
MacGyver2k
......
......@@ -1558,7 +1558,6 @@ if this fails fallback to the buildin software
*/
static void Atmo_SetupParameters(filter_t *p_filter)
{
char *psz_path;
filter_sys_t *p_sys = p_filter->p_sys;
......@@ -2450,7 +2449,7 @@ static void CheckAndStopFadeThread(filter_t *p_filter)
* StateCallback: Callback for the inputs variable "State" to get notified
* about Pause and Continue Playback events.
*****************************************************************************/
static int StateCallback( vlc_object_t *p_this, char const *psz_cmd,
static int StateCallback( vlc_object_t *, char const *,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
......@@ -2551,7 +2550,7 @@ static void DelStateVariableCallback( filter_t *p_filter )
* StateCallback: Callback for the inputs variable "State" to get notified
* about Pause and Continue Playback events.
*****************************************************************************/
static int AtmoSettingsCallback( vlc_object_t *p_this, char const *psz_var,
static int AtmoSettingsCallback( vlc_object_t *, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment