KK2.0 v1.6++ Satelite 
Features
This custom firmware was written by me for the KK2.0 controller and it has the following features:
- This version is for Spektrum Satelite and it will only work with units that support DSM2 (10 bit, 7 channels).
- Spektrum receiver binding feature was made by David Thompson.
- The 'SL stick activation' feature was removed so aileron input can no longer be used to turn 'Self-level' mode on and off.
- It has the new 'SL stick mixing' mode with four settings (Off, Low, Medium and High) selectable from the 'Self-level Settings' screen. This will give a soft transition from Self-level to ACRO mode based on aileron/elevator stick deflection. The selected setting will be displayed on the SAFE screen as 'ON' (for original SL mode), 'ON MIX L', 'ON MIX M' or 'ON MIX H' when your AUX switch is in ON position. 'OFF' indicates ACRO/MANUAL mode.
- ESC calibration is now done without a transmitter and it is sufficient to hold down a single button. This will help users with slow binding receivers do ESC calibration in a simple and safe way. Read the instructions below to learn the new ESC calibration routine.
- Alarm (i.e. 'Lost Model Alarm') can be activated from the AUX switch. 'Receiver Test' will display 'Off', 'Alarm' or 'SL On' for AUX. You'll need a 3-way switch (or two 2-way switches with mixing) assigned to your AUX channel for this to work.
- Remote gimbal offset control using channel 6 and 7. Based on Steveis' firmware, but with some of my own changes.
- Support for gimbals with differential mixing (in addition to normal gimbals). This is configurable from the 'Gimbal Settings' screen. Borrowed from Brontide's firmware.
- A 'Factory Reset' will clear the mixer table instead of loading the QUAD+ motor layout. This feature is borrowed from Brontide's firmware and further improved by me. An error message (i.e. "No motor layout") is displayed on the SAFE screen and arming is refused until a motor layout has been loaded.
- Gyro limits have been expanded to let boards with slightly damaged gyros arm. Values borrowed from Steveis' firmware.
- The 'Version Info' screen is now accessible from the main menu and is not displayed during start-up anymore. Start-up time is reduced by one second thanks to this change.
- Remote tuning of several parameters is now possible. Potentiometers assigned to channel 6 and 7 should be used for this purpose. Gimbal servo offsets are centered while tuning.
- Button and arming beeps can be turned off individually.
- Rearranged the motor layout list and made some other changes to the GUI.
- It is based on the original KK2.0 1V6 firmware (by Rolf Runar Bakke) and includes all basic features except for traditional receiver support, CPPM and 'SL stick activation'.

I have tested this firmware on my own RC models and it works without problems for me, but please read the warning below to understand the risks of using this firmware on a damaged KK2.0 board. I would hate to see anybody get hurt while using this firmware, so please take care.

WARNING!
DO NOT USE THIS FIRMWARE IF YOUR KK2.0 BOARD SUFFERS FROM DAMAGED BUTTONS OR IF YOUR ESCs HAVE PROBLEMS ENTERING CALIBRATION MODE!
IF A SINGLE BUTTON IS STUCK IN 'DOWN' POSITION AND YOUR ESCs FAIL TO ENTER CALIBRATION MODE, YOUR MOTORS WILL GO FULL THROTTLE AS SOON AS YOU PLUG IN YOUR FLIGHT BATTERY AND THEY CANNOT BE SHUT DOWN FROM YOUR TRANSMITTER! 

REMEMBER: YOU USE THIS FIRMWARE AT YOUR OWN RISK!

Yes, that was a serious warning, but you should also know that it is perfectly safe to use this firmware as long as all KK2.0 buttons are working properly and your ESCs have no problems entering calibration mode. Don't be afraid to test the new ESC calibration routine with propellers off.
Now that you have read and understood the warning above, you can continue reading about the new features. 

Satelite Connection
To get data from your Satelite unit you will need a special cable like this one from HK connected to the throttle input connector on your KK2 board. The other input pins should remain disconnected.
The 'SAFE' screen will show a "No Satelite data" message until a valid data stream has been detected (unless there are other, more important messages to display).

Binding will be necessary if you see a "Sat protocol error" message on the 'SAFE' screen. Hold down button 2 and 3 on your KK2 board while connecting the flight battery. This should configure the Satelite unit to use the DSM2 protocol.

PS: Arming is refused unless the status text on the SAFE screen reads "OK!".

ESC calibration routine (no transmitter required):
1. Remove props, but leave the motors connected so that you can hear the ESC confirmation beeps!
2. Disconnect servos if they cannot handle a sudden change from endpoint to endpoint.
3. Hold down any* button (i.e. a single button), except for the leftmost one, while connecting the flight battery.
4. Keep holding the button down while waiting for the 'High throttle' level beep(s) and then release it to set the 'Low throttle' level.
5. Push button 1 (labeled 'EXIT') after the final ESC confirmation beeps to return to the 'SAFE' screen.

* If you hold down button 1 while connecting the battery you'll see a warning (and probably hear some 'angry' beeps). Just disconnect the battery and try again (holding down a different button this time).

This calibration method will set the upper throttle level to 2.0 ms and the lower throttle level to 1.02 ms, which are the exact same values used by the original KK2.0 1V6 firmware (Don't be fooled by the "Throttle pass-through" message).

I actually recommend testing the new ESC calibration routine (WITH PROPELLERS OFF) at least once to see if your ESCs have problems entering calibration mode. Do not use this firmware if your motors spin up!

You will probably notice that the 'Version Information' screen and its one second delay has been removed from the start-up sequence. This will make the ESC calibration routine safer because your ESCs will now see the 'full throttle' signal one second sooner (compared to the original KK2.0 1V6 firmware) and this reduces the risk for having motors going full throttle while doing the ESC calibration.

SL Stick Mixing
The new 'SL Stick Mixing' mode is activated from the 'Self-level Settings' screen where you can set three levels for 'SL P-gain' reduction rate or you can turn it off completely (default) to use the original Self-level mode. You select the wanted setting by pushing button 1 - 4 on the new screen that shows up when you select 'CHANGE' on the 'SL Stick Mix' item.
The reduction rate (LOW, MEDIUM or HIGH) should be selected based on your P-gain setting on the 'Self-level Settings' screen. If your SL P-gain setting is below 30 you should select LOW for reduction rate. I would recommend selecting the MEDIUM reduction rate for SL P-gains in the 30 to 60 range and HIGH for gain values above 60 and up to 100. It is not recommended to use this feature for SL P-gain values above 100.
I have tested this mode myself and I like it very much. I have even performed a full throttle loop without problems. If you get in trouble (e.g. lose orientation) you can just center the aileron/elevator stick and the model will level itself. Another advantage is that you don't have to ramp up your 'Stick Scaling' values for flying around (compared to the original Self-level mode in KK2.0 1V6).

Observe:
- You should tune your model as best as you can in both acro and SL mode before trying the new 'SL Stick Mixing' mode.
- Centering the aileron/elevator stick while your model is upside-down will make it stay inverted until you add some more stick input.  This is a "feature" of the KK2 1.6 self-level code and not something that I've implemented.
- Don't count on this mode saving your model if you perform acrobatic stunts and exceed the 440 degrees/second gyro limitation. It may actually make it worse! 
- If your model has built up any momentum, it will not stop moving immediately after centering the aileron/elevator stick! Take it slow if you're at beginner level.
- This mode will work best for transmitters configured to use mode 2 or 3 (i.e. with aileron and elevator on the same stick).
- Avoid using this mode if your model requires excessive stick trimming (e.g. when center of gravity is too far off). This will affect the SL mixing. In other words: You should only use this mode on a well-balanced model.

Lost Model Alarm
The 'Lost Model' alarm can now be triggered from the middle position of your 3-way switch assigned to the AUX input channel. You can still use a 2-way switch to flip between acro and SL mode and if you got a second 2-way switch you can use mixing on your transmitter to allow you to trigger the alarm from the second button.

Observe:
- A short delay (less than 1 second) was added to prevent beeping when self-level is switched on and off.
- The alarm will also be triggered after 30 minutes counted from the last arm/disarm operation, just like in the original KK2.0 1V6 firmware.

Remote Gimbal Offset Control
Gimbal offsets (i.e. for roll and pitch) can be controlled from your transmitter on channel 6 and 7. Potentiometers are recommended, but you can also use switches if you only want to change between a few fixed offset positions. This feature is based on Steveis' firmware, but I did some changes to make it utilize the full input control range.

Observe:
- Roll and pitch gains are set from the 'Gimbal Settings' screen. Values in the range of 500 to 600 is common. A negative value will reverse the servo direction.
- Select gimbal mixing mode according to your gimbal type. 'Diff' is for SSG (Super Simple Gimbal) and 'None' is for normal gimbal with one servo for roll and one for pitch.
- Offsets cannot be adjusted while navigating the KK2 menus. This can only be done during flight or at the SAFE screen.
- Most 'Mixer Editor' values (e.g. Offset) for M6 and M7 have no effect on the gimbal, but output type and rate will.

Remote Tuning
This feature allows you to adjust several parameters from your transmitter (even while flying). This requires potentiometers assigned to channel 6 and 7 on your transmitter. Use the Receiver Test (2nd) screen to make sure that the input range for Aux 2 and 3 goes from -100 to +100 with zero at center.
You can adjust PI gains for aileron, elevator and rudder using this feature. If aileron and elevator is linked (see the 'Mode Settings' screen) you will be able to adjust P and I gains for both axes simultaneously. You can also adjust P gain for self-level and roll and pitch gains for camera gimbal remotely.

This is the recommended procedure for aileron, elevator and rudder PI gain tuning:
1. Center your potentiometers (channel 6 and 7).
2. Go to the 'Remote Tuning' screen and select aileron, elevator or rudder tuning mode and a suitable input rate.
3. You can now try adjusting your potentiometers to learn which one is for P and which one is for I gain, but remember to center them before leaving. You will also see how much the gain values will change based on your input rate selection.
4. Return to the SAFE screen by pressing the BACK button twice. You will see the status text "Ready for tuning".
5. Now you can fly in ACRO/MANUAL mode and adjust your potentiometers until you have found the best setting.
6. Land and go to 'Remote Tuning' screen again.
7. Press the SAVE button to save the tuned values and then center your potentiometers.
8. Repeat from step #4 (with a different input rate) if required.

This is the recommended procedure for SL P gain tuning:
1. Center your potentiometer on channel 6.
2. Go to the 'Remote Tuning' screen and select SL gain tuning mode and a suitable input rate.
3. You can now try adjusting your potentiometers to learn which one controls the P gain, but remember to center it before leaving. You will also see how much the gain value will change based on your input rate selection.
4. Return to the SAFE screen by pressing the BACK button twice. You will see the status text "Ready for tuning".
5. Now you can fly in normal SL mode (using 'SL Stick Mixing' mode will have no effect) and adjust your potentiometer until you have found the best setting.
6. Land and go to 'Remote Tuning' screen again.
8. Press the SAVE button to save the tuned gain value and then center your potentiometer.
9. Repeat from step #4 (with a different input rate) if required.

This is the recommended procedure for gimbal gain tuning:
1. Connect your camera to an external screen so you can observe the image while tilting your copter.
2. Center your potentiometers (channel 6 and 7).
3. Go to the 'Gimbal Settings' screen and set both gains to 500 (use -500 if you need to reverse the servo direction). Also set the mixing mode to match your gimbal type.
4. Go to the 'Remote Tuning' screen and select gimbal tuning mode and a suitable input rate. TIP: Start with input rate set to HIGH.
5. You can now try adjusting your potentiometers to learn which one is for roll (R) and which one is for pitch (P) gain, but remember to center them before leaving. You will also see how much the gain values will change based on your input rate selection.
6. Return to the SAFE screen by pressing the BACK button twice. You will see the status text "Ready for tuning". Arming is not recommended.
7. Move your copter around while watching the image on the external screen and adjust the potentiometers until the image appears as stable as possible.
8. Go to the 'Remote Tuning' screen again.
9. Press the SAVE button to save the tuned gain values and then center your potentiometers.
10.Repeat from step #6 (with a different input rate) if required.
11.Set Tuning Mode to OFF when done. This will let you use the potentiometers to control gimbal offsets again.

Observe:
- You can still use the original/manual input method to adjust all parameters.
- If you find it difficult to adjust the potentiometers while flying, you can always land your model and then adjust the potentiometers.
- The selected tuning mode will not be saved. Power cycling will make it return to normal mode.

Button/Arming Beeps
The 'Mode Settings' screen now has independent settings for 'Button Beep' and 'Arming Beeps'. Setting 'Button Beep' to NO will remove the short 'clicking' sound produced when you push a button on the KK2 board. Setting 'Arming Beeps' to NO will remove the loud beep produced during arming and disarming.

Observe:
- Do not disable the arming beeps if your KK2 board is covered by a canopy (or anything else) that blocks the view of the LED or LCD display.
- The start-up beep is not affected by these settings. It is there to test the piezo buzzer.
- Alarms and other beeps are unaffected as well (e.g. short beeps while throttle is idle).

LCD Contrast
The LCD contrast can now be adjusted within a limited range. Go to the 'LCD Contrast' screen and use the UP and DOWN buttons to adjust, then press the SAVE button to save your new setting and exit.

Observe:
- Pushing the BACK button will reload the last saved contrast setting.
- If you should end up with an unreadable screen, you can hold down button 1 while connecting your flight battery to reset the LCD contrast value.

Enjoy! 
Please read the information above (and especially the warning) before downloading this firmware.
Remember to write down your settings, for this firmware will certainly erase them all!
