   Timer4.attachInterrupt(tonePlayHandler);
   Timer4.setFrequency(FREQ_OF_FUNCTION);  // set how often we should run the callback function.
   Timer4.start();
+
+  // Dynon Skyview settings.
+  // For skyview export ahrs data out one of the 5 serialports (only needs serial output to AOA box, no serial input needed)
+  AoaToneMatrix[SKYVIEW][POS_HIGH_TONE_AOA_STALL] = 80;      // % (and above) where stall happens.
+  AoaToneMatrix[SKYVIEW][POS_HIGH_TONE_AOA_START] = 66;      // % (and above) where high tone starts
+  AoaToneMatrix[SKYVIEW][POS_LOW_TONE_AOA_SOLID]  = 55;     // % (and above) where a solid low tone is played.
+  AoaToneMatrix[SKYVIEW][POS_LOW_TONE_AOA_START]  = 40;      // % (and above) where low 
+  
+  // Dynon D100 and D10 settings.
+  AoaToneMatrix[D100][POS_HIGH_TONE_AOA_STALL] =  72;      // % (and above) where stall happens.
+  AoaToneMatrix[D100][POS_HIGH_TONE_AOA_START] =  32;      // % (and above) where high tone starts
+  AoaToneMatrix[D100][POS_LOW_TONE_AOA_SOLID]  =  22;      // % (and above) where a solid low tone is played.
+  AoaToneMatrix[D100][POS_LOW_TONE_AOA_START]  =   0;      // % (and above) where low 
 
 }
 

// - If no serial data is detected audio tone turns off and LED1 is off
// - MUTE_AUDIO_UNDER_IAS define is used to only activate audio tones if above a given airspeed
// 
// 7/9/2018 - 1.5.1 fix for tone PPS between solid tones.  was not calucating the right ratio for the PPS changes.
// 9/2/2018 - 1.5.2 Atempts to fix hang up issues with skyview data.  Changed start up tones.  added more comments. fix min PPS for low tone.
// 9/28/2018- 1.6.0 Fixed Skyview lockup issue.

//#define SETUP_DYNON_D100             // if this is defined then use settings (dynon D10 or D100)
#define SETUP_DYNON_SKYVIEW            // if defined then use settings for dynon skyview

#include <DueTimer.h>         // timer lib functions for using DUE timers and callbacks.
#include <stdint.h>

#define DYNON_SERIAL_LEN              53
#define DYNON_SKYVIEW_SERIAL_LEN      74

// array postions for aoa values
#define POS_HIGH_TONE_AOA_STALL   0      // % (and above) where stall happens.
#define POS_HIGH_TONE_AOA_START   1      // % (and above) where high tone starts
#define POS_LOW_TONE_AOA_SOLID    2      // % (and above) where a solid low tone is played.
#define POS_LOW_TONE_AOA_START    3      // % (and above) where low 
#define D100      0
#define SKYVIEW   1
int AoaToneMatrix[2][5];          // tone matrix for different efis units.
unsigned char WhichEFIS = D100;   // detect which efis is being read and set store it here.

// general tone settings. Tone Pulse Per Sec (PPS)  (used for all efis units)
#define HIGH_TONE_STALL_PPS       20      // how many PPS to play during stall
#define HIGH_TONE_PPS_MAX         6.5     // 6.5   
#define HIGH_TONE_PPS_MIN         1.5     // 1.5
#define HIGH_TONE_HZ              1600    // freq of high tone
#define HIGH_TONE2_HZ             1500    // a 2nd high tone that it will cycle between (if defined)
#define LOW_TONE_PPS_MAX          8.5
#define LOW_TONE_PPS_MIN          1.5
#define LOW_TONE_HZ               400     // freq of low tone

#define BAUDRATE_EFIS         115200  // baud rate for D100/D10 and dynon
#define TONE_PIN              2     // TIOA0
#define PIN_LED1              13    // internal LED for showing AOA status.
#define PIN_LED2              54    // aka A0. external LED for showing serial input.
