Post 2 made on Saturday October 2, 2010 at 11:43 |
Lyndel McGee RC Moderator |
Joined: Posts: | August 2001 13,007 |
|
|
Change:
var e,s;
to:
var e,s,volume,response;
Change:
w.label = s.match("MV?\r","\r",250);
to:
response = s.match("MV?\r","\r",250); try { volume = parseInt(response.match(/\d{2,3}/)[0]); w.label = volume; } catch(e) { Diagnostics.log("error in match or parse"); }
Even after you make these changes, you will still be left with a string that is either 2 or 3 digits long which you have to "normalize" by 80 or 50.
Suitable code to do this can be found in the VolumeBar class of the Philips Denon module.
Several key notes/gotchas:
For main volume and subwoofer volume, a value of 99 is --- or Off. On newer receivers, you can also have 995 which is -80.5db For channel volumes, you normalize by 50 in that a value of 0db is 50.
|
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|