mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-28 18:07:25 +08:00
Lights
This commit is contained in:
@@ -9,11 +9,11 @@
|
|||||||
<makefile>
|
<makefile>
|
||||||
|
|
||||||
<!-- these configureeters should be set in the airframe file unless you want the defaults
|
<!-- these configureeters should be set in the airframe file unless you want the defaults
|
||||||
<configure name="LIGHT_LED_STROBE" value="3"/>
|
<define name="LIGHT_LED_STROBE" value="3"/>
|
||||||
<configure name="LIGHT_LED_NAV" value="4"/>
|
<define name="LIGHT_LED_NAV" value="4"/>
|
||||||
|
|
||||||
<configure name="STROBE_LIGHT_MODE_DEFAULT" value="5"/>
|
<define name="STROBE_LIGHT_MODE_DEFAULT" value="5"/>
|
||||||
<configure name="NAV_LIGHT_MODE_DEFAULT" value="4"/>
|
<define name="NAV_LIGHT_MODE_DEFAULT" value="4"/>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<file name="light.c"/>
|
<file name="light.c"/>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ uint8_t strobe_light_mode;
|
|||||||
uint8_t nav_light_mode;
|
uint8_t nav_light_mode;
|
||||||
|
|
||||||
#ifndef STROBE_LIGHT_MODE_DEFAULT
|
#ifndef STROBE_LIGHT_MODE_DEFAULT
|
||||||
#define STROBE_LIGHT_MODE_DEFAULT 5
|
#define STROBE_LIGHT_MODE_DEFAULT 6
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NAV_LIGHT_MODE_DEFAULT
|
#ifndef NAV_LIGHT_MODE_DEFAULT
|
||||||
@@ -41,10 +41,10 @@ void init_light(void) {
|
|||||||
// this part is already done by led_init in fact
|
// this part is already done by led_init in fact
|
||||||
LED_INIT(LIGHT_LED_STROBE);
|
LED_INIT(LIGHT_LED_STROBE);
|
||||||
LED_OFF(LIGHT_LED_STROBE);
|
LED_OFF(LIGHT_LED_STROBE);
|
||||||
|
strobe_light_mode = STROBE_LIGHT_MODE_DEFAULT;
|
||||||
#ifdef LIGHT_LED_NAV
|
#ifdef LIGHT_LED_NAV
|
||||||
LED_INIT(LIGHT_LED_NAV);
|
LED_INIT(LIGHT_LED_NAV);
|
||||||
LED_OFF(LIGHT_LED_NAV);
|
LED_OFF(LIGHT_LED_NAV);
|
||||||
strobe_light_mode = STROBE_LIGHT_MODE_DEFAULT;
|
|
||||||
nav_light_mode = NAV_LIGHT_MODE_DEFAULT;
|
nav_light_mode = NAV_LIGHT_MODE_DEFAULT;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user