Skip to content

Commit d8e2efe

Browse files
committed
fixed error in UpdateHardware (caused by logitech media server change!)
1 parent 70b9096 commit d8e2efe

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

main/SQLHelper.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2778,14 +2778,16 @@ unsigned long long CSQLHelper::UpdateValueInt(const int HardwareID, const char*
27782778
}
27792779
}
27802780

2781-
_eHardwareTypes HWtype;
2781+
_eHardwareTypes HWtype= HTYPE_Domoticz; //just a value
27822782
CDomoticzHardwareBase *pHardware = m_mainworker.GetHardware(HardwareID);
27832783
if (pHardware != NULL)
27842784
HWtype = pHardware->HwdType;
27852785

27862786
//Check for notifications
27872787
if (HWtype != HTYPE_LogitechMediaServer) // Skip notifications for LMS here; is handled by the LMS plug-in
2788+
{
27882789
m_notifications.CheckAndHandleSwitchNotification(ulID, devname, (bIsLightSwitchOn) ? NTYPE_SWITCH_ON : NTYPE_SWITCH_OFF);
2790+
}
27892791
if (bIsLightSwitchOn)
27902792
{
27912793
if (AddjValue!=0) //Off Delay

www/secpanel/index.html

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309

310310

311311
}
312-
312+
313313
var contextClass = (window.AudioContext || window.webkitAudioContext || window.mozAudioContext || window.oAudioContext || window.msAudioContext);
314314
// firefox & ie fix
315315
if (contextClass && (navigator.userAgent.toLowerCase().indexOf('firefox') <= -1) && (navigator.userAgent.toLowerCase().indexOf('msie') <= -1)) {
@@ -348,9 +348,11 @@
348348
oscillator2.start(0);
349349
oscillator3.start(0);
350350
}
351-
else contextClass="";
351+
else
352+
contextClass="";
352353

353354
function beep(tone) {
355+
return;
354356
if (contextClass) {
355357
var frequency;
356358
if (tone=="error") {
@@ -383,20 +385,8 @@
383385
}
384386
}
385387
else {
386-
var snd='';
387-
if (tone=="error") {
388-
for(k = 11025; k--;) { snd += String.fromCharCode(Math.sin(k/44100*2*Math.PI*750)*127+128); }
389-
}
390-
else if (tone=="set") {
391-
for(k = 11025; k--;) { snd += String.fromCharCode(Math.sin(k/44100*2*Math.PI*850)*127+128); }
392-
}
393-
else {
394-
for(k = 11025; k--;) { snd += String.fromCharCode(Math.sin(k/44100*2*Math.PI*800)*127+128); }
395-
}
396-
snd = new Audio('data:audio/wav;base64,UklGRjUrAABXQVZFZm10IBAAAAA\BAAEARKwAAESsAAABAAgAZGF0YREr'+btoa('\0\0'+snd));
397-
snd.play();
388+
//No HTML5 audio context support
398389
}
399-
400390
}
401391

402392
function SetLanguageEx(lng) {

0 commit comments

Comments
 (0)