Skip to content

Commit d7ceb83

Browse files
committed
Merge branch 'master'
2 parents 6565f37 + a60a8d6 commit d7ceb83

File tree

209 files changed

+50
-49652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+50
-49652
lines changed

History.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Version 3.xxx (xxxx 2015)
8080
- Implemented: MySensors added support for V_IMPEDANCE
8181
- Changed: MySensors, rebuild
8282
- Changed: migrated to github
83+
- Implemented: Option to add a log message via the json api (see wiki)
8384

8485
Version 2.2563 (June 14th 2015)
8586
- Implemented: WebServer, native SSL and keep-alive, big thanks to chimit!!!!

getgit.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Gitversion_GET_DATE(. ProjectDate)
2828

2929
# write a file with the APPVERSION define
3030
MATH(EXPR ProjectRevision "${ProjectRevision}+2107")
31-
file(WRITE appversion.h.txt "#define APPVERSION ${ProjectRevision}\n#define APPHASH \"${ProjectRevision}\"\n#define APPDATE ${ProjectDate}\n")
31+
file(WRITE appversion.h.txt "#define APPVERSION ${ProjectRevision}\n#define APPHASH \"${ProjectHash}\"\n#define APPDATE ${ProjectDate}\n")
3232
# copy the file to the final header only if the version changes
3333
# reduces needless rebuilds
3434
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different

hardware/1Wire.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ bool C1Wire::WriteToHardware(const char *pdata, const unsigned char length)
150150
deviceIdByteArray[2]=pSen->LIGHTING2.id3;
151151
deviceIdByteArray[3]=pSen->LIGHTING2.id4;
152152

153-
_t1WireDevice device;
154153
m_system->SetLightState(ByteArrayToDeviceId(deviceIdByteArray),pSen->LIGHTING2.unitcode,pSen->LIGHTING2.cmnd==light2_sOn);
155154
return true;
156155
}

hardware/AnnaThermostat.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ void CAnnaThermostat::SetSetpoint(const int idx, const float temp)
204204
szURL << "/thermostat";
205205

206206
std::stringstream sPostData;
207-
std::stringstream Url;
208207
std::vector<std::string> ExtraHeaders;
209208
std::string sResult;
210209

hardware/BMP085.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ int CBMP085::bmp_WriteCmd(int fd, uint8_t devAction)
254254
int CBMP085::bmp_Calibration(int fd)
255255
{
256256
#ifdef __arm__
257-
uint8_t rValue[21];
257+
uint8_t rValue[22];
258258
//printf("Entering Calibration\n");
259259
if (bmp_ReadInt(fd,rValue,0xAA,22) == 0)
260260
{

hardware/Dummy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ namespace http {
7575
}
7676
nid += 82000;
7777
char ID[40];
78-
sprintf(ID, "%ld", nid);
78+
sprintf(ID, "%lu", nid);
7979

8080
std::string devname;
8181

hardware/ForecastIO.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ void CForecastIO::GetMeterDetails()
150150
fclose(fOut);
151151
*/
152152

153-
std::string tmpstr;
154153
float temp;
155154
int humidity=0;
156155
int barometric=0;

hardware/FritzboxTCP.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ void FritzboxTCP::UpdateSwitch(const unsigned char Idx, const int SubUnit, const
230230

231231
char szIdx[10];
232232
sprintf(szIdx, "%X%02X%02X%02X", 0, 0, 0, Idx);
233-
std::stringstream szQuery;
234233
std::vector<std::vector<std::string> > result;
235234
result = m_sql.safe_query("SELECT Name,nValue,sValue FROM DeviceStatus WHERE (HardwareID==%d) AND (DeviceID=='%q') AND (Unit ==%d)", m_HwdID, szIdx, SubUnit);
236235
if (result.size() < 1)

hardware/HardwareMonitor.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void CHardwareMonitor::SendFanSensor(const int Idx, const int FanSpeed, const st
299299

300300
void CHardwareMonitor::GetInternalTemperature()
301301
{
302-
std::vector<std::string> ret = ExecuteCommandAndReturn(szInternalTemperatureCommand.c_str());
302+
std::vector<std::string> ret = ExecuteCommandAndReturn(szInternalTemperatureCommand);
303303
if (ret.size() < 1)
304304
return;
305305
std::string tmpline = ret[0];
@@ -324,7 +324,7 @@ void CHardwareMonitor::GetInternalTemperature()
324324

325325
void CHardwareMonitor::GetInternalVoltage()
326326
{
327-
std::vector<std::string> ret = ExecuteCommandAndReturn(szInternalVoltageCommand.c_str());
327+
std::vector<std::string> ret = ExecuteCommandAndReturn(szInternalVoltageCommand);
328328
if (ret.size() < 1)
329329
return;
330330
std::string tmpline = ret[0];
@@ -346,7 +346,7 @@ void CHardwareMonitor::GetInternalVoltage()
346346

347347
void CHardwareMonitor::GetInternalCurrent()
348348
{
349-
std::vector<std::string> ret = ExecuteCommandAndReturn(szInternalCurrentCommand.c_str());
349+
std::vector<std::string> ret = ExecuteCommandAndReturn(szInternalCurrentCommand);
350350
if (ret.size() < 1)
351351
return;
352352
std::string tmpline = ret[0];
@@ -492,7 +492,7 @@ bool CHardwareMonitor::IsOHMRunning()
492492
return false;
493493
}
494494

495-
void CHardwareMonitor::RunWMIQuery(const char* qTable,const char* qType)
495+
void CHardwareMonitor::RunWMIQuery(const char* qTable, const std::string &qType)
496496
{
497497
if (pServicesOHM && pServicesSystem)
498498
{
@@ -611,6 +611,7 @@ void CHardwareMonitor::RunWMIQuery(const char* qTable,const char* qType)
611611
break;
612612
totcpu++;
613613
}
614+
fclose(fIn);
614615
}
615616
if (totcpu<1)
616617
m_lastquerytime=0;

hardware/HardwareMonitor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class CHardwareMonitor : public CDomoticzHardwareBase
3838
void InitWMI();
3939
void ExitWMI();
4040
bool IsOHMRunning();
41-
void RunWMIQuery(const char* qTable, const char* qType);
41+
void RunWMIQuery(const char* qTable, const std::string &qType);
4242
IWbemLocator *pLocator;
4343
IWbemServices *pServicesOHM;
4444
IWbemServices *pServicesSystem;

0 commit comments

Comments
 (0)