Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#91813 - 03/05/2002 08:05 Button LED feedback needed.
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Ok, I'm trying to make the button LED support in Hijack more robust. Here's the scoop: With HJ262, I had funkadelic flashing buttons whenever my headlights were on in my '00 Golf. I investigated the dimmer detection code in HJ, and established that a PWM dimmer line could in certain circumstances cause this. So I changed it, and now it works in my car fine. AFAIK it should also work in cars without PWM dimmer lines.
I also at the same time discovered a timing bug that could result in LED commands being lost completely, or misunderstood by the PIC. So I made a change here too. But I suspect that I still haven't got this right as Fusto has been having issues. But no-one else has shouted yet, which means that either no-one else is having issues, or no-one else is using my changes. My changes are in HJ263 onwards.

So, in order to get this working right for everybody, I'd really like to get feedback from everyone who has button LEDs. I'll lay out an example and template of what I'm looking for below, please make the effort to try and fill in as much info as possible. I'll apologise for the amount of info that I'm asking for, but it really will help me. Thanks.


Car: 2000 Golf. (PWM dimmer line)
Dimmer Capacitor fix: Yes (If you don't know what this is then answer No.)

With <= HJ262:
Headlights Off: Fine.
Headlights On: Funkadelic
HL Off -> On: Often creates display dimmer issues.
HL On -> Off: Fine.
Power Up with HL Off: Occassionally LEDs don't light.
Power Up with HL On: Funkadelic

With >= HJ263:
Headlights Off: Fine.
Headlights On: Fine.
HL Off -> On: Occassionally creates display dimmer issues.
HL On -> Off: Fine.
Power Up with HL Off: Occassionally LEDs don't light.
Power Up with HL On: Fine.

Car:
Dimmer Capacitor fix:

With <= HJ262:
Headlights Off:
Headlights On:
HL Off -> On:
HL On -> Off:
Power Up with HL Off:
Power Up with HL On:

With >= HJ263:
Headlights Off:
Headlights On:
HL Off -> On:
HL On -> Off:
Power Up with HL Off:
Power Up with HL On:
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#91814 - 03/05/2002 08:15 Re: Button LED feedback needed. [Re: genixia]
lopan
old hand

Registered: 28/01/2002
Posts: 970
Loc: Manassas VA
that was the same thing that was happening in my 99 audi a4, I disconnected my dimmer in the car to fix it but I'll try connecting it tonight and let you know! This may be a stupid question but what does "HL Off and On" mean?
_________________________
Brett 60Gb MK2a with Led's

Top
#91815 - 03/05/2002 09:17 Re: Button LED feedback needed. [Re: lopan]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
Headlights On / Headlights Off
On -> Off indicate the act of switching headlights off.

/Michael
_________________________
/Michael

Top
#91816 - 03/05/2002 10:12 Re: Button LED feedback needed. [Re: mtempsch]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Car: 2000 Honda Accord.
Headlight-sense wire is simple on/off voltage, not PWM

All modes of headlight operation have been fine in all recent versions of Hijack I've tried, including the current 263.
_________________________
Tony Fabris

Top
#91817 - 03/05/2002 10:47 Re: Button LED feedback needed. [Re: tfabris]
morrisdl
enthusiast

Registered: 21/08/2000
Posts: 346
Loc: Rochester, NY USA
Car: 2000 Toyota 4runner
With >= HJ263:
Headlights Off: Fine.
Headlights On: Fine.
HL Off -> On: creates display dimmer issues once in 7 days.
HL On -> Off: Fine.
Power Up with HL Off: 30% LEDs don't light.
Power Up with HL On: Fine.
_________________________
Cheers, -Doug Morrison Mk2-32G Back light buttons, Neon red screen

Top
#91818 - 06/05/2002 10:53 Re: Button LED feedback needed. [Re: lopan]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Bumpetity-bump. Anyone-else?

_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#91819 - 06/05/2002 11:25 Re: Button LED feedback needed. [Re: genixia]
lopan
old hand

Registered: 28/01/2002
Posts: 970
Loc: Manassas VA
ooops.... you just reminded me that I need to test that... I had another question... would there be anyway to add something to the led brightness section in hijack to include turn on LED's upon turning on the headlights? I just think it would be cool to have the option to only turn on the buttons when the headlights are on...
_________________________
Brett 60Gb MK2a with Led's

Top
#91820 - 06/05/2002 11:55 Re: Button LED feedback needed. [Re: lopan]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
I'll bear that idea in mind. I'm thinking about reworking the button LED code substantially. Ideas so far include:

1)Trying to get PWM to affect the LED level so that my buttons dim when I dim my dash lighting during long night drives.

2)Get the button LED code to play more nicely with the display dimming code so that they don't confuse each other.

3)Hijacking the display dimmer and applying (1) to it.

4)Regardless of (1) and (3), make it possible to set distinct HL On and HL Off values. (At the moment they are computationally related).

5) I'm considering how to make best use of the flash setting in the above scheme. Perhaps when PWM is in use, the flash settings become a mulitplier to the brightness so that we can calibrate the button_LEDs to the dash.

6)Maintaining backward compatibility.

These are just ideas at the moment. The hardest part is trying to measure the duty cycle of a PWM line, given that we don't know what frequency it's running at. (And every car will be different).
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#91821 - 08/05/2002 07:33 Re: Button LED feedback needed. [Re: genixia]
fusto
addict

Registered: 27/12/2001
Posts: 504
Loc: Lummi Island, WA
Car: 1995 Golf - Headlight sense only (no PWM)
Dimmer Capacitor fix: Uh.. I dont know. mlord did my install, does he usually do the dimmer fix too? I'm guessing I dont have it, cause I still have the symptoms.

With <= HJ262:
Headlights Off: Fine
Headlights On: Fine
HL Off -> On: Fine 9 X out of 10 (sometimes confused)
HL On -> Off: Fine 9 X out of 10 (sometimes confused)
Power Up with HL Off: Fine
Power Up with HL On: Led's turn off completely, VFD not effected

With >= HJ263: (HJ 266)
Headlights Off: OK 4 X out of 10. Sometimes VFD dimmer is set randomly, sometimes the Led's are set randomly, sometimes both.
Headlights On: Funkadelic
HL Off -> On: OK 7 X out of 10. VFD and Leds set randomly
HL On -> Off: Goes back to normal 3 x out of 10. VFD somtimes turns off, occasionally the LED's turn off, sometimed both, sometimes brighter.
Power Up with HL Off: OK 9 X out of 10. (occasionally Dimmer or Led's confused)
Power Up with HL On: OK 2 X out of 10. Sometimes No LED's, sometimes no VFD.
_________________________
...all I ask is a tall ship and a star to steer her by.

Top
#91822 - 08/05/2002 09:46 Re: Button LED feedback needed. [Re: fusto]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411

Dimmer Capacitor fix: Uh.. I dont know. mlord did my install, does he usually do the dimmer fix too? I'm guessing I dont have it, cause I still have the symptoms.


You'd probably remember paying him the extra $10 for it. The dimmer capacitor fix wont fix all the issues,eg I'm certain that there is a race hazard between the display code and the button LED code somewhere, but it should fix the ocassional display issue seen by people *not* using hte button LED code.

Thanks for the great info. It sure looks screwy. Let me dig on vwvortex and see if I can find out any more info on the headlight line.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#91823 - 08/05/2002 10:52 Re: Button LED feedback needed. [Re: genixia]
fusto
addict

Registered: 27/12/2001
Posts: 504
Loc: Lummi Island, WA
Its really weird that my VW is having such a headlight sense issue.
I would assume that the older Mark III VW's would just have a simple on/off headlight sense line. The stock head unit didnt respond to dashboard dimmer settings. Just on or off.
Weird...

Vwvortex is great though isnt it?
_________________________
...all I ask is a tall ship and a star to steer her by.

Top
#91824 - 04/07/2002 05:16 Re: Button LED feedback needed. [Re: genixia]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Any more feedback?? I should get some time to work on this soon, and there should be more people with button LEDs since this thread was started.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#91825 - 04/07/2002 09:34 Re: Button LED feedback needed. [Re: genixia]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
My buttons still work great, even when turning the headlights on and off, as I said earlier in the thread. I am convinced that those who are having problems with the button illumination are those whose cars use PWM on their dimmer wires.

Is there any way for Hijack to piggyback off of the player's existing dimmer sensing code? Instead of Hijack trying to detect the state of the dimmer line itself, and do its "own thing", perhaps instead, it could try to detect what the player software is doing with the dimness of the display VFD and just follow its lead?

THEN AGAIN... with Rob now having backlit buttons of his own, perhaps support for backlit buttons will appear in the default software and we won't need to worry about putting it in Hijack any more.
_________________________
Tony Fabris

Top
#91826 - 04/07/2002 13:11 Re: Button LED feedback needed. [Re: genixia]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
I'll try to get around to testing it this weekend - had totally forgotten about this thread. I have a '01 Polo which I'm fairly sure has a PWM illumination wire, as I have to turn the illumination full up or down to get stable behavior from the buttons (otherwise they blink bright/dim with about 1/2 Hz frequency)
Unfortunately we have mandatory dipped beam (often with reduced intensity) even during daylight, so the illumination wire is always active with the car on.
I've been thinking of tapping into the headlight switch (auto/park/on) for a "proper" illumination wire, but haven't yet been annoyed enough...

/Michael
_________________________
/Michael

Top
#91827 - 06/07/2002 06:30 Re: Button LED feedback needed. [Re: genixia]
fusto
addict

Registered: 27/12/2001
Posts: 504
Loc: Lummi Island, WA
My player is currently back at empeg getting the dimmer capacitor fix.
I think I should have it back next week some time.
Ill let you know how that effects the wierdness of the LED's/VFD.
As far as I know the old A3 VW's dont have PWM on the dimmer line, but I could be mistaken. I thought that was a new VW/Audi thing only.

Anyhoo, Ill post my new results if any.

Zachary
_________________________
...all I ask is a tall ship and a star to steer her by.

Top
#91828 - 06/07/2002 13:18 Re: Button LED feedback needed. (Hijack v280) [Re: tfabris]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Hijack cannot detect when the player is dimming the display or not. All it can see is what the current display dimmer value is, and it can notice it being changed.

But it cannot tell whether the user is tweaking it, or the player is responding to headlight sense. Too bad.

But today I did rewrite the dimmer sense code so that it works for me again (try this: turn your headlights ON, and THEN start the car -- watch what happens to your buttonLEDs. If it's not obvious enough, then set "buttonled_off=0" in config.ini and try it again.

Speaking of which, there does already exist a buttonled_off=n parameter for specifying what you want to happen when the player is in standby. By default, Hijack just reduces the LED level (no lower than "1"), but this can be overridden by specifying a specific standby brightness level.

I also tweaked a few other buttonLED related routines, and it works better now for me.

Cheers


Edited by mlord (06/07/2002 13:20)

Top
#91829 - 08/07/2002 01:15 Re: Button LED feedback needed. [Re: genixia]
Anonymous
Unregistered


insects or empegs sit down. 3rd party software applications or meats sleep. meats go outside of carrots. tables, cabinet members, and phatboxes despite of toads hop despite of dimensions. empegs or children post. children or hearts lay down.

Top
#91830 - 08/07/2002 04:08 Re: Button LED feedback needed. [Re: ]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
...okay...

Granted, I have been lazy and not reading every thread in every topic on the BBS. This is, however, my first encounter with "empegbot". Has someone loaded an untested Microsoft service pack on Tony's autoresponder?
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#91831 - 08/07/2002 05:58 Re: Button LED feedback needed. [Re: pgrzelak]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Man, that Nimda virus sure can wreak havoc, can't it?

(Actually, I'm investigating this right now and I'll ban its IP address range if I have to).
_________________________
Tony Fabris

Top