Topic: Muting the LCD using ["ASnative"](5,20)

I'm able to successfully read the LCD brightness setting using:

      _getLCDMute = ["ASnative"](5,19); // get the value of the LCD "mute"
    debText = String(_getLCDMute());

If I change the LCD brightness through the control panel, debText changes accordingly -- no problem.

But, I've been unable to set the brightness using:

    _setLCDMute = ["ASnative"](5,20); // set the value of the LCD "mute"
        _setLCDMute(1);

I also tried:

    ["ASnative"](5,20)(1);

which didn't work either.

I'm new to Flash, not sure if I'm doing something wrong.  I'm using Flash MX version 6.0 (hence the AS2 syntax -- using ASnative(5,19) instead of ["ASnative"](5,19) didn't work.

Any clues?  Thanks.

--Scott

Re: Muting the LCD using ["ASnative"](5,20)

Yes - many of these kinds of things are "privileged" operations, and are not allowed for widgets, but rather movies run locally.

Having widgets wantonly changing hardware settings isn't a good idea.

Re: Muting the LCD using ["ASnative"](5,20)

Hmmm... understood.  But, without a light sensor or programmatic control, this means that twice a day I need to burrow through the control panel to change the brightness.  Or, my wife will, thus lowering the Chumby WAF (Wife Acceptance Factor).

Are volume controls also in the category of unchangeable hardware settings for widgets?

In any case, thanks for the reply.

Re: Muting the LCD using ["ASnative"](5,20)

smirer wrote:

Hmmm... understood.  But, without a light sensor or programmatic control, this means that twice a day I need to burrow through the control panel to change the brightness.  Or, my wife will, thus lowering the Chumby WAF (Wife Acceptance Factor).

You'll see that functionality in the Control Panel soon.

Are volume controls also in the category of unchangeable hardware settings for widgets?

Yes, just as something on a web page would not be able to alter the volume on your computer.  A widget can control the volume of it's *own* audio through the normal Flash mechanism, but it can't affect other widgets or the overall volume of the system.

Re: Muting the LCD using ["ASnative"](5,20)

So much for open and hackable! 

I think the analogy to a web page is flawed; a widget is not a web page.  I don't stumble across widgets like I stumble across web pages.  If I don't like what a widget does to the volume or LCD, I won't use it.  Why did you even bother to document _setLCDMute() if it doesn't work?

I'm very frustrated by this, if you can't tell.  I wasted a lot of time and suffered through some marital strife, trying to make the Chumby an acceptable (to my wife) bedside clock, only to discover that my approach wouldn't work because the developers just felt that a widget "shouldn't be allowed to do that."

(I wrote a "NightClock" widget that exits after 15 seconds between 0630 and 2100, and stays running between 2100 and 0630 - it's a dark grey analog clock and it attempted to dim the backlight during "sleep mode", but that part doesn't work.)

My current workaround is this:

chumby:~# cat /psp/cgi-bin/dim
#!/bin/sh
echo 1 > /proc/sys/sense1/dimlevel
echo "HTTP/1.1 200 ok"
echo "Content-type: text/plain"
echo ""
echo "done"

Then on my server, cron calls curl 'http://\040none\041.local/cgi-bin/custom/dim' > /dev/null

As an aside, does anyone know why does '\040none\041.local' work as a mDNS name for my chumby?

Re: Muting the LCD using ["ASnative"](5,20)

Well, you could do what I've been doing lately and run off of a USB key rather than using Chumby's flash shell at all. That gives me full access to everything and do whatever I want with the hardware or servers.