1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00
Commit graph

91 commits

Author SHA1 Message Date
Chris Penny
bfa79ab010 changed ledStripIsOnFlag to ledStripEnabled and ledStripEnabled fail check 2015-01-20 22:43:32 +00:00
Chris Penny
aede4037cf LED on/off add via LEDLOW mode 2015-01-20 19:51:07 +00:00
Chris Penny
0da650b5bd changed rc mode to BOXLEDLOW 2015-01-20 10:45:10 +00:00
chris-penny
48bd7c1e19 I hope this is along the right lines... I have it running on NAZE32 ACRO
it is using the BOXLLIGHTS at the moment but I'll update it to use
BOXLEDLOW asap
2015-01-19 22:53:02 +00:00
Dominic Clifton
ad65722f0e Code size reduction when led animation is disabled. 2015-01-15 16:53:14 +00:00
Dominic Clifton
30b928c0bc Cleanup unit test compiler flags. Fix compiler warnings in unit test
and related code.
2015-01-14 15:09:29 +00:00
Dominic Clifton
10d507ccc6 LedStrip failsafe warning now correctly checks that the feature is
enabled.
2014-12-28 00:49:57 +00:00
Dominic Clifton
367eb79bd0 Add battery warning beeper. Update MSP_MISC/MSP_SET_MISC.
Note the old beeper was essentially 'battery critical'.
2014-12-19 22:16:47 +00:00
Dominic Clifton
d41e8631ee Disable and cleanup some debug output. 2014-11-26 00:28:53 +00:00
Dominic Clifton
386c14c9e7 Update LedStrip warnings indication so it's clearer what warnings are
active.

This also has better performance, warning colors are only calculated
once per led strip update cycle.
2014-11-22 18:18:50 +00:00
Dominic Clifton
45218357fa Narrow LED strip indicator deadband so that indicators are displayed for
smaller pitch/roll input movements.
2014-10-29 01:05:01 +00:00
Dominic Clifton
7d4abb8a4a Add parenthesis to expressions to imrove code clarity and remove IDE
warning.
2014-09-29 01:11:00 +01:00
Dominic Clifton
10abdd3afa Update warning mode leds to show when arming is disabled.
Idea and initial implementation by viktor80.  Closes #96.
2014-09-27 00:34:02 +01:00
Dominic Clifton
6883a8f2a7 Fix led cli command when led strip feature is not enabled. Fixes #95. 2014-09-27 00:14:04 +01:00
Dominic Clifton
3ed6afba17 Removing timing instrumentation from CC3D & LEDSTRIP build. 2014-09-20 01:04:40 +01:00
Dominic Clifton
e847a6347d Improve speed of LED STRIP code.
Shaved about 150us each strip update.

This commit leaves in some timing trace code for the CC3D target, the
results of which can be seen in the debug variables for the sections
being timed.

A later commit will remove/disable the timing code.
2014-09-20 01:00:13 +01:00
Dominic Clifton
d904741f43 Update LED throttle mode to use rcData instead of rcThrottle, avoid
having to reference min/maxThrottle.

Range was not being calculated correctly.

Throttle color now blends with the current color of the LED so that at
mid throttle any orientation color is still correct when mixing Throttle
and Flight Mode on an LED.

Fix tabs.  Reduce nesting level.
2014-09-19 01:46:41 +01:00
Dominic Clifton
9723df947e Merge pull request #83 from goebish/cleanflight-throttle-led
Throttle level indicator led mode
2014-09-19 00:18:55 +01:00
Dominic Clifton
0e2b0ccafd Adding note regarding color index usage. 2014-09-19 00:15:58 +01:00
Goebish
16871c7a91 Merge remote-tracking branch 'cleanflight/master' into cleanflight-throttle-led 2014-09-19 01:10:21 +02:00
Goebish
b83e7b42b7 Add throttle level indicator led mode 2014-09-19 01:09:59 +02:00
Dominic Clifton
72eac8048a Allow colors to be configurable via the cli.
color x h,s,v

x = 0-15
h = 0-359
s = 0-255
v = 0-255
2014-09-19 00:08:40 +01:00
Dominic Clifton
545980c14a Move colors from ram to master config. Initialise colors only when
config is reset to defaults.
2014-09-18 22:53:12 +01:00
Dominic Clifton
79ea1ac088 Store colors in flash, copy to ram and use from ram. Store mode colors
as color ids instead of duplicating the color data.

Later, this will allow configurable colors as the colors can be copied
to the master config and used from that without any ram penalty.
2014-09-18 21:59:37 +01:00
Dominic Clifton
0b4f5804bc Update led strip code to use HSV instead of RGB. 2014-09-18 20:53:28 +01:00
Dominic Clifton
1790e082fe Ensure led strip is configured in updateLedStrip method to prevent crash
when enabling the feature from the cli.
2014-09-16 00:29:41 +01:00
Dominic Clifton
d60183d91d Normalize all the line endings 2014-09-15 23:40:17 +01:00
Dominic Clifton
a287f9247d Allow led strip to show failsafe state. Closes #76. 2014-09-15 23:24:08 +01:00
Dominic Clifton
99a296821a Update default led strip config so there is always an orientation light
on at the front when the battery alarm is on.
2014-09-15 20:24:00 +01:00
Dominic Clifton
6ce5736990 Update LED strip code to allow configurable LED strips.
See documentation for details.
2014-09-15 03:15:11 +01:00
Dominic Clifton
d577b93026 Alternate layout for a 31-LED quad - disabled by default. 2014-09-03 15:58:28 +01:00
Dominic Clifton
3f0754d295 Replace global flags with stateFlags, flightModeFlags and armingFlags.
Each flag was previously a whole byte, now all of the flags only take up
4 bytes as they are represented by bit masks.

This is cleaner because the different kind of flags are now separated.

Additionally this changes the behaviour of arming slightly.  When using
a switch to arm the aircraft will not arm unless the switch has been in
the off state once.  This prevents arming if you power the aircraft with
a low throttle and the switch in the on position.
2014-08-24 12:11:30 +01:00
Dominic Clifton
53623d4d7f Update led strip compile in/out. 2014-08-01 01:15:05 +01:00
Dominic Clifton
5086b46f1f Add simple LED animation when disarmed. Fixed led grid size
calculation.
2014-07-26 18:21:58 +01:00
Dominic Clifton
4e284b3e41 Calculate led grid size dynamically. 2014-07-26 16:23:26 +01:00
Dominic Clifton
21c8fdc69b Update led config so it's possible to show which LEDs show the arm
state.  Mutually exclusive with leds that show MODE.

Use blue to indicate armed, green for disarmed.

Leds not configured for ARM_STATE or MODE will be off by default.

The example combines corner LEDs with ARM_STATE and INDICATOR.  This
results in the corner leds showing arm state and then being overridden
with an indicator color as needed.
2014-07-02 23:50:39 +01:00
Dominic Clifton
3ce33f0455 Update battery warning and turn indicators to use led config.
Cleaned up the battery warning checking as it was being calculated twice
instead of just once per battery warning state cycle.

Updated the code so that modes are shown when disarmed.  Any led's
without the MODE flag will then show the armed state.  In the config in
this commit that results in the corner LEDs being GREEN when disarmed
and OFF when armed.
2014-07-02 23:38:19 +01:00
Dominic Clifton
36990951df Adding code to change led colors based on mode and armed state. 2014-07-02 21:53:50 +01:00
Dominic Clifton
de04acd7e1 First cut of programmatically orientation lights using an LED strip
configuration that defines each LED's functions, orientation and
position in a grid.
2014-07-02 20:40:26 +01:00
Dominic Clifton
af2f9a2655 Work-in-progress 2014-07-02 08:58:10 +01:00
Dominic Clifton
1730e3dfd3 Relocated led strip user code into separate file.
Added documentation.

Added LED_STRIP feature, can only be enabled under certain circumstances
depending on target due to pin/timer mappings - see documentation.
2014-06-09 19:11:31 +01:00