-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Master logical led #10579
Master logical led #10579
Conversation
@PX4/testflights - Please test this against master. Note only the onboard LED behavior. AMBER or RED, BLUE and GREEN leds. master and this PR should look the same on all HW except for FMUV5 (and FMUv5 mini RC5) - the Power (Green LED) should be on solid and the ACT (Blue LED) should blink. Note on my FMUv4pro the leds (in the case) are installed backwards and do not work. FYI @klopezal |
fef11b4
to
d5e180d
Compare
ran this against master on a pixhawk 1 running v2 and a pixhawk mini with v3 |
tested with pixhawk 2.1 and 4. is the same at the master |
@santiago3dr we would need to create a heavy load on cpu. Here is one way to do it. (tested on a FMUv5 mini) |
tested with pixhawk pro v4 and pixhawk mini v3. is the same at the master |
@dagar - I would say good to go |
@@ -71,6 +71,10 @@ | |||
#define GPIO_LED_BLUE_L (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN2) | |||
|
|||
#define BOARD_HAS_CONTROL_STATUS_LEDS 1 | |||
#define BOARD_HAS_CONTROL_STATUS_LEDS 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fixed, based on current master
3d087de
to
21f5486
Compare
@dagar - can we get this into master and on the BP for the mini? |
This commit is the groundwork to fix the power LED blinking on V5 Background: ---------- Early boards only had an AMBER LED that was used to indicate a High Load condition. This change defines the new logical inteface the LED_<color> should not be used in application code moving forward, only the minipulator macros should be used. Logical usage Legacy default ------------------------+------------- BOARD_OVERLOAD_LED | LED_RED Later boards defined BOARD_HAS_CONTROL_STATUS_LEDS and added the use of a BLUE and GREEN LED that were used as follows: Logical usage Legacy default ------------------------+------------- BOARD_ARMED_LED | LED_BLUE BOARD_ARMED_STATE_LED | LED_GREEN With this PR a board may now define _only_ a subset the leds and map them at the board level to the color LED it wants to use. Logical usage Legacy default ------------------------+------------- BOARD_OVERLOAD_LED | LED_RED when BOARD_HAS_CONTROL_STATUS_LEDS is defined BOARD_ARMED_LED | LED_BLUE BOARD_ARMED_STATE_LED | LED_GREEN If any of the BOARD_{OVERLOAD|ARMED|ARMED_STATE}_LED are not defined. The code output generates a null action for that LED.
add support for all the LEDS to support BOARD_HAS_CONTROL_STATUS_LEDS
Define the logical LED that are uses on aerofc-v1
Define the logical LED that are uses on auav-x21
Define the logical LED that are uses on crazyflie
Define the logical LED that are uses on mindpx-v2
Define the logical LED that are uses on nxphlite-v3
Define the logical LED that are uses on omnibus-f4sd
Define the logical LED that are uses on px4-same70xplained-v1
Define the logical LED that are uses on px4-stm32f4discovery
Define the logical LED that are uses on px4fmu-v2
Define the logical LED that are uses on px4fmu-v4
Define the logical LED that are uses on px4fmu-v4pro
Define the logical LED that are uses on px4fmu-v5
Define the logical LED that are uses on px4nucleoF767ZI-v1
Define the logical LED that are uses on sitl
21f5486
to
e6596a3
Compare
This PR is the groundwork to fix the power LED blinking on V5
Background:
Early boards only had an AMBER LED that was used to
indicate a High Load condition.
This change defines the new logical interface
the LED_ should not be used in application
code moving forward, only the manipulator macros
should be used.
Later boards defined BOARD_HAS_CONTROL_STATUS_LEDS
and added the use of a BLUE and GREEN LED that were
used as follows:
Logical usage Legacy default
------------------------+-------------
BOARD_ARMED_LED | LED_BLUE
BOARD_ARMED_STATE_LED | LED_GREEN
With this PR a board may now define only a subset
the leds and map them at the board level to the
color LED it wants to use.
If any of the BOARD_{OVERLOAD|ARMED|ARMED_STATE}_LED are not defined. The code output generates a null action for that LED.