Skip to content

Commit bfe805c

Browse files
committed
- Changed: Setpoint Up/Down rounds up to 0.5 degrees
- update sqlite database
1 parent 0fbd69a commit bfe805c

26 files changed

+66
-31
lines changed

History.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ Version 2.0.xxxx (xxxx 2015)
114114
- Implemented: OTGW, CH_Enable/DHW_Enable are now switchable (Thanks to Rob K)
115115
- Implemented: OTGW, support for GPIO A/B switches(Thanks to Rob K)
116116
- Implemented: 'Nest Thermostat' hardware support
117+
- Changed: Setpoint Up/Down rounds up to 0.5 degrees
117118

118119
Version 2.0.2284 (February 22th 2015)
119120
- Fixed: Firefox, RGBW/Setpoint popup

msbuild/domoticz.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<UseDebugLibraries>false</UseDebugLibraries>
2828
<WholeProgramOptimization>true</WholeProgramOptimization>
2929
<CharacterSet>MultiByte</CharacterSet>
30-
<PlatformToolset>v120</PlatformToolset>
30+
<PlatformToolset>v100</PlatformToolset>
3131
</PropertyGroup>
3232
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
3333
<ImportGroup Label="ExtensionSettings">

sqlite/sqlite3.c

Lines changed: 55 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
** This file is an amalgamation of many separate C source files from SQLite
3-
** version 3.8.10. By combining all the individual C code files into this
3+
** version 3.8.10.2. By combining all the individual C code files into this
44
** single large file, the entire code can be compiled as a single translation
55
** unit. This allows many compilers to do optimizations that would not be
66
** possible if the files were compiled separately. Performance improvements
@@ -318,9 +318,9 @@ extern "C" {
318318
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
319319
** [sqlite_version()] and [sqlite_source_id()].
320320
*/
321-
#define SQLITE_VERSION "3.8.10"
321+
#define SQLITE_VERSION "3.8.10.2"
322322
#define SQLITE_VERSION_NUMBER 3008010
323-
#define SQLITE_SOURCE_ID "2015-05-04 19:13:25 850c11866686a7b39d7b163fb60898c11283688e"
323+
#define SQLITE_SOURCE_ID "2015-05-20 18:17:19 2ef4f3a5b1d1d0c4338f8243d40a2452cc1f7fe4"
324324

325325
/*
326326
** CAPI3REF: Run-Time Library Version Numbers
@@ -14126,6 +14126,9 @@ static const char * const azCompileOpt[] = {
1412614126
#if SQLITE_ENABLE_COLUMN_METADATA
1412714127
"ENABLE_COLUMN_METADATA",
1412814128
#endif
14129+
#if SQLITE_ENABLE_DBSTAT_VTAB
14130+
"ENABLE_DBSTAT_VTAB",
14131+
#endif
1412914132
#if SQLITE_ENABLE_EXPENSIVE_ASSERT
1413014133
"ENABLE_EXPENSIVE_ASSERT",
1413114134
#endif
@@ -21592,7 +21595,6 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
2159221595
}
2159321596
}while( !done && (c=(*++fmt))!=0 );
2159421597
/* Get the field width */
21595-
width = 0;
2159621598
if( c=='*' ){
2159721599
if( bArgList ){
2159821600
width = (int)getIntArg(pArgList);
@@ -21616,7 +21618,6 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
2161621618

2161721619
/* Get the precision */
2161821620
if( c=='.' ){
21619-
precision = 0;
2162021621
c = *++fmt;
2162121622
if( c=='*' ){
2162221623
if( bArgList ){
@@ -55479,7 +55480,7 @@ SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int pageSize, int nReserve,
5547955480
if( pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE &&
5548055481
((pageSize-1)&pageSize)==0 ){
5548155482
assert( (pageSize & 7)==0 );
55482-
assert( !pBt->pPage1 && !pBt->pCursor );
55483+
assert( !pBt->pCursor );
5548355484
pBt->pageSize = (u32)pageSize;
5548455485
freeTempSpace(pBt);
5548555486
}
@@ -71038,6 +71039,7 @@ static void applyAffinity(
7103871039
if( 0==(pRec->flags&MEM_Str) && (pRec->flags&(MEM_Real|MEM_Int)) ){
7103971040
sqlite3VdbeMemStringify(pRec, enc, 1);
7104071041
}
71042+
pRec->flags &= ~(MEM_Real|MEM_Int);
7104171043
}
7104271044
}
7104371045

@@ -71816,7 +71818,6 @@ case OP_Halt: {
7181671818
assert( rc==SQLITE_OK || db->nDeferredCons>0 || db->nDeferredImmCons>0 );
7181771819
rc = p->rc ? SQLITE_ERROR : SQLITE_DONE;
7181871820
}
71819-
pOp = &aOp[pcx];
7182071821
goto vdbe_return;
7182171822
}
7182271823

@@ -76744,7 +76745,6 @@ case OP_JournalMode: { /* out2 */
7674476745
}
7674576746
eNew = sqlite3PagerSetJournalMode(pPager, eNew);
7674676747

76747-
pOut = &aMem[pOp->p2];
7674876748
pOut->flags = MEM_Str|MEM_Static|MEM_Term;
7674976749
pOut->z = (char *)sqlite3JournalModename(eNew);
7675076750
pOut->n = sqlite3Strlen30(pOut->z);
@@ -81395,7 +81395,6 @@ static void resolveAlias(
8139581395
assert( iCol>=0 && iCol<pEList->nExpr );
8139681396
pOrig = pEList->a[iCol].pExpr;
8139781397
assert( pOrig!=0 );
81398-
assert( (pOrig->flags & EP_Resolved)!=0 || zType[0]==0 );
8139981398
db = pParse->db;
8140081399
pDup = sqlite3ExprDup(db, pOrig, 0);
8140181400
if( pDup==0 ) return;
@@ -84056,7 +84055,7 @@ SQLITE_PRIVATE u32 sqlite3ExprListFlags(const ExprList *pList){
8405684055
if( pList ){
8405784056
for(i=0; i<pList->nExpr; i++){
8405884057
Expr *pExpr = pList->a[i].pExpr;
84059-
if( ALWAYS(pExpr) ) m |= pList->a[i].pExpr->flags;
84058+
if( ALWAYS(pExpr) ) m |= pExpr->flags;
8406084059
}
8406184060
}
8406284061
return m;
@@ -130868,6 +130867,13 @@ static int openDatabase(
130868130867
}
130869130868
#endif
130870130869

130870+
#ifdef SQLITE_ENABLE_DBSTAT_VTAB
130871+
if( !db->mallocFailed && rc==SQLITE_OK){
130872+
int sqlite3_dbstat_register(sqlite3*);
130873+
rc = sqlite3_dbstat_register(db);
130874+
}
130875+
#endif
130876+
130871130877
/* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking
130872130878
** mode. -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking
130873130879
** mode. Doing nothing at all also makes NORMAL the default.
@@ -155229,7 +155235,7 @@ SQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule(
155229155235
*/
155230155236

155231155237
#if (defined(SQLITE_ENABLE_DBSTAT_VTAB) || defined(SQLITE_TEST)) \
155232-
&& !defined(SQLITE_OMIT_VIRTUAL_TABLE)
155238+
&& !defined(SQLITE_OMIT_VIRTUALTABLE)
155233155239

155234155240
/*
155235155241
** Page paths:
@@ -155331,6 +155337,7 @@ struct StatCursor {
155331155337
struct StatTable {
155332155338
sqlite3_vtab base;
155333155339
sqlite3 *db;
155340+
int iDb; /* Index of database to analyze */
155334155341
};
155335155342

155336155343
#ifndef get2byte
@@ -155349,7 +155356,17 @@ static int statConnect(
155349155356
){
155350155357
StatTable *pTab = 0;
155351155358
int rc = SQLITE_OK;
155359+
int iDb;
155352155360

155361+
if( argc>=4 ){
155362+
iDb = sqlite3FindDbName(db, argv[3]);
155363+
if( iDb<0 ){
155364+
*pzErr = sqlite3_mprintf("no such database: %s", argv[3]);
155365+
return SQLITE_ERROR;
155366+
}
155367+
}else{
155368+
iDb = 0;
155369+
}
155353155370
rc = sqlite3_declare_vtab(db, VTAB_SCHEMA);
155354155371
if( rc==SQLITE_OK ){
155355155372
pTab = (StatTable *)sqlite3_malloc64(sizeof(StatTable));
@@ -155360,6 +155377,7 @@ static int statConnect(
155360155377
if( rc==SQLITE_OK ){
155361155378
memset(pTab, 0, sizeof(StatTable));
155362155379
pTab->db = db;
155380+
pTab->iDb = iDb;
155363155381
}
155364155382

155365155383
*ppVtab = (sqlite3_vtab*)pTab;
@@ -155414,16 +155432,22 @@ static int statOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){
155414155432
if( pCsr==0 ){
155415155433
rc = SQLITE_NOMEM;
155416155434
}else{
155435+
char *zSql;
155417155436
memset(pCsr, 0, sizeof(StatCursor));
155418155437
pCsr->base.pVtab = pVTab;
155419155438

155420-
rc = sqlite3_prepare_v2(pTab->db,
155439+
zSql = sqlite3_mprintf(
155421155440
"SELECT 'sqlite_master' AS name, 1 AS rootpage, 'table' AS type"
155422155441
" UNION ALL "
155423-
"SELECT name, rootpage, type FROM sqlite_master WHERE rootpage!=0"
155424-
" ORDER BY name", -1,
155425-
&pCsr->pStmt, 0
155426-
);
155442+
"SELECT name, rootpage, type"
155443+
" FROM \"%w\".sqlite_master WHERE rootpage!=0"
155444+
" ORDER BY name", pTab->db->aDb[pTab->iDb].zName);
155445+
if( zSql==0 ){
155446+
rc = SQLITE_NOMEM;
155447+
}else{
155448+
rc = sqlite3_prepare_v2(pTab->db, zSql, -1, &pCsr->pStmt, 0);
155449+
sqlite3_free(zSql);
155450+
}
155427155451
if( rc!=SQLITE_OK ){
155428155452
sqlite3_free(pCsr);
155429155453
pCsr = 0;
@@ -155589,7 +155613,7 @@ static int statDecodePage(Btree *pBt, StatPage *p){
155589155613
*/
155590155614
static void statSizeAndOffset(StatCursor *pCsr){
155591155615
StatTable *pTab = (StatTable *)((sqlite3_vtab_cursor *)pCsr)->pVtab;
155592-
Btree *pBt = pTab->db->aDb[0].pBt;
155616+
Btree *pBt = pTab->db->aDb[pTab->iDb].pBt;
155593155617
Pager *pPager = sqlite3BtreePager(pBt);
155594155618
sqlite3_file *fd;
155595155619
sqlite3_int64 x[2];
@@ -155603,7 +155627,7 @@ static void statSizeAndOffset(StatCursor *pCsr){
155603155627
*/
155604155628
fd = sqlite3PagerFile(pPager);
155605155629
x[0] = pCsr->iPageno;
155606-
if( sqlite3OsFileControl(fd, 230440, &x)==SQLITE_OK ){
155630+
if( fd->pMethods!=0 && sqlite3OsFileControl(fd, 230440, &x)==SQLITE_OK ){
155607155631
pCsr->iOffset = x[0];
155608155632
pCsr->szPage = (int)x[1];
155609155633
}
@@ -155615,9 +155639,10 @@ static void statSizeAndOffset(StatCursor *pCsr){
155615155639
static int statNext(sqlite3_vtab_cursor *pCursor){
155616155640
int rc;
155617155641
int nPayload;
155642+
char *z;
155618155643
StatCursor *pCsr = (StatCursor *)pCursor;
155619155644
StatTable *pTab = (StatTable *)pCursor->pVtab;
155620-
Btree *pBt = pTab->db->aDb[0].pBt;
155645+
Btree *pBt = pTab->db->aDb[pTab->iDb].pBt;
155621155646
Pager *pPager = sqlite3BtreePager(pBt);
155622155647

155623155648
sqlite3_free(pCsr->zPath);
@@ -155637,8 +155662,9 @@ static int statNext(sqlite3_vtab_cursor *pCursor){
155637155662
rc = sqlite3PagerGet(pPager, iRoot, &pCsr->aPage[0].pPg);
155638155663
pCsr->aPage[0].iPgno = iRoot;
155639155664
pCsr->aPage[0].iCell = 0;
155640-
pCsr->aPage[0].zPath = sqlite3_mprintf("/");
155665+
pCsr->aPage[0].zPath = z = sqlite3_mprintf("/");
155641155666
pCsr->iPage = 0;
155667+
if( z==0 ) rc = SQLITE_NOMEM;
155642155668
}else{
155643155669
pCsr->isEof = 1;
155644155670
return sqlite3_reset(pCsr->pStmt);
@@ -155661,7 +155687,7 @@ static int statNext(sqlite3_vtab_cursor *pCursor){
155661155687
pCsr->zPagetype = "overflow";
155662155688
pCsr->nCell = 0;
155663155689
pCsr->nMxPayload = 0;
155664-
pCsr->zPath = sqlite3_mprintf(
155690+
pCsr->zPath = z = sqlite3_mprintf(
155665155691
"%s%.3x+%.6x", p->zPath, p->iCell, pCell->iOvfl
155666155692
);
155667155693
if( pCell->iOvfl<pCell->nOvfl-1 ){
@@ -155673,7 +155699,7 @@ static int statNext(sqlite3_vtab_cursor *pCursor){
155673155699
}
155674155700
pCell->iOvfl++;
155675155701
statSizeAndOffset(pCsr);
155676-
return SQLITE_OK;
155702+
return z==0 ? SQLITE_NOMEM : SQLITE_OK;
155677155703
}
155678155704
if( p->iRightChildPg ) break;
155679155705
p->iCell++;
@@ -155695,8 +155721,9 @@ static int statNext(sqlite3_vtab_cursor *pCursor){
155695155721
}
155696155722
rc = sqlite3PagerGet(pPager, p[1].iPgno, &p[1].pPg);
155697155723
p[1].iCell = 0;
155698-
p[1].zPath = sqlite3_mprintf("%s%.3x/", p->zPath, p->iCell);
155724+
p[1].zPath = z = sqlite3_mprintf("%s%.3x/", p->zPath, p->iCell);
155699155725
p->iCell++;
155726+
if( z==0 ) rc = SQLITE_NOMEM;
155700155727
}
155701155728

155702155729

@@ -155729,7 +155756,8 @@ static int statNext(sqlite3_vtab_cursor *pCursor){
155729155756
pCsr->nCell = p->nCell;
155730155757
pCsr->nUnused = p->nUnused;
155731155758
pCsr->nMxPayload = p->nMxPayload;
155732-
pCsr->zPath = sqlite3_mprintf("%s", p->zPath);
155759+
pCsr->zPath = z = sqlite3_mprintf("%s", p->zPath);
155760+
if( z==0 ) rc = SQLITE_NOMEM;
155733155761
nPayload = 0;
155734155762
for(i=0; i<p->nCell; i++){
155735155763
nPayload += p->aCell[i].nLocal;
@@ -155765,7 +155793,7 @@ static int statColumn(
155765155793
StatCursor *pCsr = (StatCursor *)pCursor;
155766155794
switch( i ){
155767155795
case 0: /* name */
155768-
sqlite3_result_text(ctx, pCsr->zName, -1, SQLITE_STATIC);
155796+
sqlite3_result_text(ctx, pCsr->zName, -1, SQLITE_TRANSIENT);
155769155797
break;
155770155798
case 1: /* path */
155771155799
sqlite3_result_text(ctx, pCsr->zPath, -1, SQLITE_TRANSIENT);
@@ -155791,7 +155819,8 @@ static int statColumn(
155791155819
case 8: /* pgoffset */
155792155820
sqlite3_result_int64(ctx, pCsr->iOffset);
155793155821
break;
155794-
case 9: /* pgsize */
155822+
default: /* pgsize */
155823+
assert( i==9 );
155795155824
sqlite3_result_int(ctx, pCsr->szPage);
155796155825
break;
155797155826
}

sqlite/sqlite3.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ extern "C" {
111111
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112112
** [sqlite_version()] and [sqlite_source_id()].
113113
*/
114-
#define SQLITE_VERSION "3.8.10"
114+
#define SQLITE_VERSION "3.8.10.2"
115115
#define SQLITE_VERSION_NUMBER 3008010
116-
#define SQLITE_SOURCE_ID "2015-05-04 19:13:25 850c11866686a7b39d7b163fb60898c11283688e"
116+
#define SQLITE_SOURCE_ID "2015-05-20 18:17:19 2ef4f3a5b1d1d0c4338f8243d40a2452cc1f7fe4"
117117

118118
/*
119119
** CAPI3REF: Run-Time Library Version Numbers

www/app/HardwareController.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2263,6 +2263,11 @@ define(['app'], function (app) {
22632263
sDataTimeout=days + " " + $.t("Days");
22642264
}
22652265
}
2266+
2267+
var dispAddress=item.Address;
2268+
if (HwTypeStr.indexOf("S0 Meter") >= 0) {
2269+
dispAddress="";
2270+
}
22662271

22672272
var addId = oTable.fnAddData( {
22682273
"DT_RowId": item.idx,
@@ -2285,7 +2290,7 @@ define(['app'], function (app) {
22852290
"1": item.Name,
22862291
"2": enabledstr,
22872292
"3": HwTypeStr,
2288-
"4": item.Address,
2293+
"4": dispAddress,
22892294
"5": SerialName,
22902295
"6": sDataTimeout
22912296
} );

www/html5.appcache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# ref 913
2+
# ref 917
33

44
CACHE:
55
# CSS

www/i18n/domoticz-bg.json.gz

0 Bytes
Binary file not shown.

www/i18n/domoticz-cs.json.gz

0 Bytes
Binary file not shown.

www/i18n/domoticz-de.json.gz

9 Bytes
Binary file not shown.

www/i18n/domoticz-el.json.gz

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)