maxBacklight

Discuss the Firewing development environment

maxBacklight

Postby AndrewB » Tue Feb 23, 2016 3:56 pm

I am using the Backlight PWM as an external PWM control as I have run out off ports etc.
Can I cap the default setting "public const maxBacklight = 1023" using a variable.

I would like to vary this max value real time.
AndrewB
 
Posts: 94
Joined: Thu Jan 02, 2014 3:38 pm

Re: maxBacklight

Postby David John Barker » Wed Feb 24, 2016 8:49 am

I'm not quite sure what you mean. If you are saying you have changed the port the LCD backlight is on, then use high(pinX) to switch on and low(pinX) to switch off.
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: maxBacklight

Postby AndrewB » Wed Feb 24, 2016 9:36 am

I would like to use Dogm as it already has min max limits.
What I was thinking of doing was to write to SetBacklight with a sensor value using the min and max settings.
But I would like to change the max and cap it.

I'm guessing that the routine are compiled in the programme anyway so may as well use them.
I can then visually view the pwm without having to add the hardware.
AndrewB
 
Posts: 94
Joined: Thu Jan 02, 2014 3:38 pm

Re: maxBacklight

Postby David John Barker » Wed Feb 24, 2016 10:43 am

Personally, I would just cap the value going into SetBacklight(). However, the LCD module is open so feel free to hack it to fit your requirements. Before you do that, either (1) make a back up of the module or (2) copy the current module into your UserLibrary folder (C:\ProgramData\Mecanique\Firewing\UserLibrary). With option (2), you can change the module and it will be automatically linked into your main program. Importanly, it won't be overwritten should you perform a compiler update.
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: maxBacklight

Postby AndrewB » Wed Feb 24, 2016 11:49 am

I've capped the data going in and not touching Dogm so probably leave it that way. Thanks
AndrewB
 
Posts: 94
Joined: Thu Jan 02, 2014 3:38 pm


Return to Development Environment

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x