mirror of
https://github.com/rad1o/f1rmware.git
synced 2026-02-20 02:01:21 +01:00
Merge pull request #28 from SuperTux88/display-backlight-charging
display backlight always on while charging, when chargeled is 1
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#include <r0ketlib/config.h>
|
||||
#include <rad1olib/setup.h>
|
||||
#include <rad1olib/battery.h>
|
||||
#include <rad1olib/pins.h>
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include <libopencm3/lpc43xx/adc.h>
|
||||
@@ -17,6 +19,11 @@ char _isnight=1;
|
||||
void LightCheck(void){
|
||||
// adc_get_single(ADC0,ADC_CR_CH6)*2*330/1023
|
||||
|
||||
if(GLOBAL(chargeled) && batteryCharging()){
|
||||
_isnight=1;
|
||||
return;
|
||||
}
|
||||
|
||||
SETUPadc(LED4);
|
||||
|
||||
uint32_t last_light=light;
|
||||
|
||||
Reference in New Issue
Block a user