Hello community!
The beauty of open source is that if you don't like something, you can change it. So here I am showing you my last changes to both: Mission Planner and ArduCopter (in the future it could be moved to library to be used by all Ardu* projects).
Before I start I would like to gather all threads about the subject that encouraged me to make all those changes:
* U4eake's showleds, arming and low battery warning leds
* Adding External LED Indicators and a Piezo Beeper for Arm and GPS Status
* Navigation Lights with digital RGB LEDs together with an APM 2.5
So of course there is jD-IOBoard for $16.00 but we are in DIY community and as we can see in above threads many of us prefer simpler and much cheaper solution (like 8x Darlington for less than $1). So IOBoard is ready out of the box solution but there is still demand on some hacky stuff and this is to address that.
There are 2 main areas that the new tab is trying to cover:
1) beeper
2) LEDs
Of course one could attach other elements like relays to those pins but I'll stick to default version.
So LEDs part is nothing new (yet). It's just user interface to already existing LED_MODE variable that you can alter via Advanced parameters tab. Instead of calculating bitmask you can now use simple checkboxes. However, I introduced LED_STYLE variable (combobox) to allow me adding more fancy LED behavior leaving "Legacy" one as backward compatible with the current version. This is still work-in-progress.
The brand new stuff is beeper part. Currently the beeper is controlled by one bit in LED bitmask enabling or disabling its functionality. With my changes we now have BEEPER_MODE bitmask with 8 functions (I already have idea for 9th one - failsafe - but it will require 2 bytes for the bitfield so it's postponed for now). You can see those 8 features on the attached screen - should be self explanatory. Selecting beeper pin should be possible with incoming changes to the code - for now it's disabled and it's hardcoded as AN5.
Every feature has different beep pattern and I tried to keep them quick but recognizable. The code is no longer using delay() function which is very bad (freezing uC code is not what we want it such application).
The changes are still in my branch and we'll see if dev will merge it into trunk to be available for all. If you are willing to test it you will have to grab it from here and flash APM (tested only on APM2 so far) as it adds variables in EEPROM. New Mission Planner is also there.
In the future plans there are other LED styles allowing more flexible LED behaviors. Any suggestions are welcomed.
Hope you like it.