Advertisement
Tronnic

MWOSD Kiss Settings

Oct 8th, 2016
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.39 KB | None | 0 0
  1. /*-------------------------- MANDATORY configurable parameters ----------------------------------------------------*/
  2. /*-------------------------- MANDATORY configurable parameters ----------------------------------------------------*/
  3.  
  4. /******************** OSD HARDWARE settings *********************/
  5. //Choose ONLY ONE option:
  6. #define MINIMOSD // Uncomment this if using standard MINIMOSD hardware
  7. //#define MICROMINIMOSD // Uncomment this if using the MICRO MINIMOSD hardware
  8. //#define RTFQV1 // Uncomment this if using standard RTFQ/Witespy V1.1 OSD, select this to correct for both swapped bat1/bat 2 and to also use alternative resistors / pinouts.
  9. //#define RTFQMICRO // Uncomment this if using micro RTFQ/Witespy Micro Minim OSD, select this to correct for swapped bat1/bat 2.
  10. //#define RUSHDUINO // Uncomment this if using Rushduino
  11. //#define KYLIN250PDB // Uncomment this if using a Kylin 250 FPV PDB (Using A6 as VOLTAGEPIN)
  12.  
  13. // NOTE-some of the popular RTFQ/Witespy boards have swapped bat1/bat2 pins and alternative voltage measuring resistors
  14. // If having difficulties, first select default MINIMOSD as above, then use the following to correct:
  15. // #define SWAPVOLTAGEPINS // For boards with batt voltage appearing on vid voltage
  16. // #define ALTERNATEDIVIDERS // For boards with voltage unable to be adjusted high enough
  17.  
  18. // For hardwares WITHOUT access to MAX RESET pin (e.g. Airbot MicroOSD v2.3)
  19. //#define MAX_SOFTRESET
  20.  
  21.  
  22. /******************** CONTROLLER SOFTWARE *********************/
  23. // Choose ONLY ONE option:-
  24. // Note - choose carefully to ensure correct settings are written to flight controller.
  25. // The first three are for convenience - they set the OSD for the latest FC version.
  26. // IMPORTANT - remember to update MWOSD when updating FC software!!
  27.  
  28. // Choose ONLY ONE option from the following long list :-
  29.  
  30. // latest release...
  31. //#define MULTIWII // Uncomment this if you are using latest MULTIWII version from repository (2.4 at time of this MWOSD release)
  32. //#define BASEFLIGHT // Uncomment this if you are using latest BASEFLIGHT version from repository (Stable 2015.08.27 at time of this MWOSD release)
  33. //#define LIBREPILOT // Uncomment this if you are using the latest LibrePilot MSP Module
  34. //#define TAULABS // Uncomment this if you are using the latest Tau Labs MSP Module
  35. //#define DRONIN // Uncomment this if you are using the latest DRONIN MSP Module
  36. //#define CLEANFLIGHT // Uncomment this if you are using latest CLEANFLIGHT version from repository (1.11.0 at time of this MWOSD release)
  37. //#define BETAFLIGHT // Uncomment this if you are using BETAFLIGHT (same as CLEANFLIGHT at time of this MWOSD release)
  38. //#define FIXEDWING_BF // Uncomment this if you are using fixed wing Baseflight
  39. //#define FIXEDWING_BF_SERVO // Uncomment this if you are using fixed wing Baseflight with additional SERVO adjustment menu.
  40. //#define HARAKIRI // Uncomment this if you are using HARAKIRI (for BOXNAMES compatibility)
  41. //#define NAZA // Uncomment this if you are using NAZA flight controller
  42. //#define iNAV // Uncomment this if you are using latest iNAV version from repository (1.01 at time of this MWOSD release)
  43. #define KISS // Uncomment this if you are using KISS FC
  44. //#define APM // Uncomment this if you are using APM MAVLINK compatible FC (Requires testing)
  45. //#define SKYTRACK // Under development
  46. //#define GPSOSD_UBLOX // Uncomment this if you are using a UBLOX GPS module for a GPS based OSD
  47. //#define GPSOSD_NMEA // Uncomment this if you are using a NMEA compatible GPS module for a GPS based OSD
  48. //#define GPSOSD_MTK // Uncomment this if you are using a MTK module for a GPS based OSD
  49. //#define NOCONTROLLER // Uncomment this if you have nothing connected to the serial port - no controller or GPS module
  50. // old releases supported...
  51. //#define MULTIWII_V23 // Uncomment this if you are using MW versions 2.2/2.3
  52. //#define MULTIWII_V21 // Uncomment this if you are using MW versions 2.0/2.1 (for BOXNAMES compatibility)
  53. //#define BASEFLIGHT20150327 // Uncomment this if you are using BASEFLIGHT up to and including version Stable 2015.03.27
  54. //#define CLEANFLIGHT172 // Uncomment this if you are using CLEANFLIGHT versions up to and including 1.7.2
  55. //#define CLEANFLIGHT180 // Uncomment this if you are using CLEANFLIGHT versions 1.8.0 & 1.8.1
  56.  
  57. /******************** AIRCRAFT/INSTALLATION TYPE settings *********************/
  58. //Choose ONLY ONE option:
  59. #define ROTORCRAFT // Default for multirotors etc.
  60. //#define FIXEDWING // Uncomment this if you are using fixed wing with MultiWii or Baseflight
  61.  
  62. /*-------------------------- INITIALISATION options ----------------------------------------------------*/
  63. /*-------------------------- INITIALISATION options ----------------------------------------------------*/
  64. // Ignore this section unless you know you need to use it !!
  65. // This section contains initialisation options that only require to be run once.
  66. // Once the initialisation has completed, all sections should be commented and the sketch re-uploaded.
  67. // Font upload will take 90 seconds after upload is completed. If connected to a camera, you will see teh font table displayed.
  68.  
  69. //#define EEPROM_CLEAR // Uncomment to force a wipe and reload of default settings at each OSD start. Same as EEPROM_CLEAR sketch.
  70. //#define LOADFONT_DEFAULT // Uncomment to force an upload of default font instead of using GUI
  71. //#define LOADFONT_LARGE // Uncomment to force an upload of large font instead of using GUI
  72. //#define LOADFONT_BOLD // Uncomment to force an upload of bold font instead of using GUI
  73.  
  74.  
  75.  
  76. /*-------------------------- OPTIONAL configurable parameters ----------------------------------------------------*/
  77. /*-------------------------- OPTIONAL configurable parameters ----------------------------------------------------*/
  78.  
  79. /******************** FEATURES *********************/
  80. // Disable features if you require memory for other features
  81. // Further configuration may be require elsewhere in config.h + option enabled on GUI
  82. //#define SBDIRECTION // Enable/disable sidebar indicators (changes in speed or altitude)
  83. //#define HORIZON // Enable/disable HORIZON indicator
  84. //#define MAPMODE // Enable/disable MAP MODE - map indication of relative positions of home and aircraft
  85. //#define GPSTIME // Enable/disable GPS Time functions
  86. //#define SPORT // Enable/disable FRSKY S.PORT cell code
  87.  
  88.  
  89. /******************** TELEMETRY settings *********************/
  90. //Select ONLY if you are sure your OSD is connected to a telemetry feed:
  91. //#define TELEMETRY_LTM // Uncomment this if you are using a LTM telemetry feed (under development)
  92. //#define TELEMETRY_MAVLINK // Uncomment this if you are using a MAVLINK telemetry feed (under development)
  93. //#define TELEMETRY_SKYTRACK // Under development
  94. //#define SETHOMEARMED // Uncomment this to disable reset home position when arming. Use if FC armed data is sent via LTM
  95. //#define FORCE_MSP // Uncomment to enable use of MSP as well as telemetry. Uses more memory
  96.  
  97.  
  98. /******************** GPS OSD settings *********************/
  99. #define GPSHOMEFIX 50 // Number of consecutive valid fixes before home will be set. 50@ 10hz = 5 seconds of valid fixes.
  100. #define HOMESATFIX 6 // Minimum number of sats required when setting initial home location.
  101. #define GPSOSDARMDISTANCE 20 // distance from home in meters when GPSOSD arms. Starts flight timer etc.
  102. #define GPSOSDHOMEDISTANCE 40 // distance from home in meters when GPSOSD is home. When speed is low it disarms and displays summary screen.
  103. //#define OSD_SWITCH_RSSI // Enables 3 way screen switch using a TX channel via a RX channel connected to the OSD RSSI pin. Typically used for GPSOSD.
  104. //#define PWMTHROTTLE // Enables throttle feature, virtual current sensor using RC throttle connected into OSD RSSI pin. Calibrate throttle using GUI RSSI cal functions
  105. //#define PPMOSDCONTROL // Enables full OSD menu, screen switching, RSSI, Throttle feature, virtual current sensor, etc using a PPM signal into OSD RSSI pin. Requires TX type to be set below.
  106. //#define SERIAL_SUM_PPM_RHF // Enable for Robe/Hitec/Futaba
  107. //#define SERIAL_SUM_PPM_GS // Enable for Graupner/Spektrum
  108. //#define SERIAL_SUM_PPM_M // Enable for Multiplex
  109. //#define SERIAL_SUM_PPM_HS // Enable for Hitec/Sanwa
  110.  
  111.  
  112. /******************** FILTER settings *********************/
  113. //Choose ONLY ONE option to enable filtered smoother readings of voltage / current / RSSI :
  114. #define FILTER_AVG // Enable standard averaging filter
  115. //#define FILTER_HYSTERYSIS 2 // Alternative filter with hysteris to provide smoother changes. Higher number = more filtering. Max 4
  116.  
  117. /******************** RSSI settings (PWM/PPM) *********************/
  118. //Choose ONLY ONE option:
  119. //Note all require PWM RSSI to be enabled on GUI
  120. //#define INTPWMRSSI // Undefine this to use new interrupt PWM RSSI method (standard PWM 0-2000ms pulse width)
  121. //#define PULSEINPWMRSSI // DEPRECATED Undefine this to use legacy non interrupt PWM RSSI method (pulse width 0 - 2000ms pulse width)
  122. #define RCRSSI 7 // Undefine this to use RC channel (0-7) for RSSI (this can be from the FC - or a PPM channel with GPSOSD)
  123.  
  124.  
  125. /******************** GPS settings *********************/
  126. #define MINSATFIX 5 // Number of sats required for a fix. 5 minimum. More = better.
  127.  
  128.  
  129. /******************** ALARM/STATUS settings *********************/
  130. #define ALARM_VOLTAGE // Text alerts if voltage below voltage alarm - in addition to flashing voltage indicator
  131. #define ALARM_SATS // Text alerts if sats below MINSATFIX - in addition to flashing sat indicator
  132. #define ALARM_GPS 5 // Text alerts if no GPS data for more than x secs. Sets GPS sats to zero
  133. #define ALARM_MSP 3 // Text alerts if no Flight controller data for more than x secs.
  134. #define FORCE_DISP_LOW_VOLTS // Enable display low voltage warning override for screen layouts where its disabled
  135. //#define FORCE_DISP_LOW_VID_VOLTS // Enable display low VIDEO voltage warning override for screen layouts where its disabled
  136.  
  137.  
  138. /******************** AIRCRAFT type=FIXEDWING settings *********************/
  139. // **ONLY** valid when using fixed wing
  140. //#define USEMAGHEADING // Undefine this to use MAG for FW heading instead of GPS (requires controller with MAG sensor)
  141. //#define USEBAROALTITUDE // Undefine this if you have a BARO to use BARO for FW altitude instead of GPS (requires controller with BARO sensor) ** Recommended **
  142. //#define USEGLIDESCOPE 40 // Enables ILS glidescope where 40 = 4.0° glidescope. 1.0 deg gradiented scope scale requires enabling in layouts
  143. //#define DISABLEGPSALTITUDERESET // Disables automatic reset of GPS Altitude to zero at arm for FC that already provide this functionality.
  144. //#define LONG_RANGE_DISPLAY // Enable this to for long range display consolidation - displays distance in KM or feet when exceed 9999m or ft. Auto enabled for FIXEDWING
  145.  
  146.  
  147. /******************** Serial speed settings *********************/
  148. // Overides defaults if required (57.6k for MAVLINK based or 115k for all others).
  149. //#define BAUDRATE 115200
  150. //#define BAUDRATE 57600
  151. //#define BAUDRATE 38400
  152. //#define BAUDRATE 19200
  153. //#define BAUDRATE 9600
  154.  
  155.  
  156. /******************** Mavlink settings *********************/
  157. #define MAVLINKREQ // Enable this for mavlink systems where the Mavlink data requires requesting.
  158.  
  159.  
  160. /******************** Serial MSP speed settings *********************/
  161. // Choose ONLY ONE option: increases speeds of serial update - but with impact to flight controller
  162. //#define MSP_SPEED_LOW // Enable for soft serial / slow baud rates.
  163. #define MSP_SPEED_MED // Default
  164. //#define MSP_SPEED_HIGH // Enable for faster AHI and speed updates. Requires higher baud rates and increases overhead on the FC to process
  165.  
  166.  
  167. /******************** CALLSIGN settings *********************/
  168. #define CALLSIGNINTERVAL 60 // How frequently to display Callsign (in seconds)
  169. #define CALLSIGNDURATION 4 // How long to display Callsign (in seconds)
  170. #define CALLSIGNALWAYS // Alternative option - enable to permanently display callsign.
  171. //#define FREETEXTLLIGHTS // Alternative option - enable to display freetext (or callsign) when LLIGHTS Switch active on TX.
  172. //#define FREETEXTGIMBAL // Alternative option - enable to display freetext (or callsign) when GIMBAL Switch active on TX.
  173.  
  174. /******************** STARTUP settings *********************/
  175. #define INTRO_VERSION "MWOSD - DEV 1.6.2.0" // Call the OSD something else if you prefer.
  176. #define INTRO_MENU // Enable to display TX stick MENU
  177. #define INTRO_CALLSIGN // Enable to display callsign at startup
  178. #define INTRO_SIGNALTYPE // Enable to display video type at startup
  179. //#define INTRO_DELAY 5 // Seconds intro screen should show for. Default is 8
  180. //#define STARTUPDELAY 2000 // Enable alternative startup delay (in ms) to allow MAX chip voltage to rise fully and initialise before configuring
  181.  
  182.  
  183. /******************** I2CGPS type settings *********************/
  184. //#define I2CGPS_SPEED // Uncomment this if you are using older I2CGPS - and need to correct for speed error (10x too slow)
  185. //#define I2CGPS_DISTANCE // Uncomment this if you are using older I2CGPS - and need to correct for distance error (650m max) UNTESTED
  186.  
  187.  
  188. /******************** MAP MODE Settings *********************/
  189. //#define MAPMODENORTH // Enable to use North as MAP reference in MODE 1 instead of take off direction (Default = disable)
  190.  
  191.  
  192. /******************** Display Settings ************************/
  193. #define MAXSTALLDETECT // Enable to attempt to detect MAX chip stall from bad power. Attempts to restart.
  194. #define AUTOCAM // Disable if no screen display. Enables autodetect Camera type PAL/NTSC. Overrides GUI/OSD settings.
  195. #define USE_VSYNC // Disable if no screen display. Removes sparklies as updates screen during blanking time period.
  196. #define DECIMAL '.' // Decimal point character, change to what suits you best (.) (,)
  197. //#define SHIFTDOWN // Select if your monitor cannot display top line fully. It shifts top 3 lines down. Not suitable for all layouts
  198. //#define ALT_CENTER // Enable alternative center crosshair
  199. //#define FORCECROSSHAIR // Forces a crosshair even if no AHI / horizon used
  200. //#define HIDEARMEDSTATUS // Enable to hide ARMED / DISARMED status
  201. //#define HIDESUMMARY // Enable to suspend display of summary screen when disarming
  202. //#define SHORTSUMMARY // Display only timer on flight summary
  203. //#define FASTPIXEL // Optional - may improve resolution - especially hi res cams
  204. //#define WHITEBRIGHTNESS 0x01 // Optional change from default 0x00=120%,0x01=100%,0x10=90%,0x11=80% default is 0x01=100%
  205. //#define BLACKBRIGHTNESS 0x00 // Optional change from default 0x00=0%,0x01=10%,0x10=20%0x11=30% default is 0x00=0%
  206. //#define I2CERROR 3 // Autodisplay Mutltiwii I2C errors if exceeds specified count
  207. //#define NOTHROTTLESPACE // Enable to remove space between throttle symbol and the data
  208. //#define DISPLAY_PR // Display pitch / roll angles. Requires relevant layout ppositions to be enabled
  209. //#define FULLAHI // Enable to display a slightly longer AHI line
  210. //#define REVERSEAHI // Reverse pitch / roll direction of AHI - for DJI / Eastern bloc OSD users
  211. //#define AHICORRECT 10 // Enable to adjust AHI on display to match horizon. -10 = -1 degree
  212. #define AHIPITCHMAX 200 // Specify maximum AHI pitch value displayed. Default 200 = 20.0 degrees
  213. #define AHIROLLMAX 400 // Specify maximum AHI roll value displayed. Default 400 = 40.0 degrees
  214. #define AHILEVEL // Enable to display AHI level indicators on sidebars
  215. #define APINDICATOR // Enable to display AUTOPILOT instead of RTH distance
  216. #define GUISENSORS // Enable if wish to view raw sensor data on GUI
  217. //#define DISPLAYWATTS // Enable this to display Watts (if power selected in layouts)
  218. //#define DISPLAYEFFICIENCY // Enable this to display Watts/KMh or Mph for efficiency (if power selected in layouts)
  219. //#define LONG_RANGE_DISPLAY // Enable this to for long range display consolidation - displays distance in KM or feet when exceed 9999m or ft
  220. #define AIRMODE 30 // Enable this to display BETAFLIGHT airmode icon. Value determines distance in characters between mode icon and airmode icon. 2 = next to it. 30 = below it
  221. //#define CROPGPSPOSITION // Crop GPS coordinate display to decimals only ".DDDDDDD"
  222.  
  223. /******************** TRANSMITTER MODE for STICK MENU *********************/
  224. //#define MODE1 // Enable this if wish to use cursor controls on same stick - for MODE 1 TX users
  225.  
  226.  
  227. /******************** Airspeed Settings ************************/
  228. // Completely UNTESTED for future integration of support for airspeed sensor
  229. // Uses temp pin
  230. // Overrides GPS speed
  231. //#define USE_AIRSPEED_SENSOR
  232. #define AIRSPEED_ZERO 512 // AIRSPEED ZERO calibration (0-1024) typically 512 for HK pilot sensor
  233. #define AIRSPEED_CAL 78.125 // Adjusting factor
  234.  
  235.  
  236. /******************** NAZA Settings ************************/
  237. //#define NAZAMODECONTROL // Enables NAZA mode control display using a PWM signal into OSD RSSI pin. Can be used with OSD_SWITCH_RSSI
  238. #define NAZA_MODE_GPS 1600
  239. #define NAZA_MODE_ATI
  240. #define NAZA_MODE_MAN 1400
  241.  
  242.  
  243. /******************** Voltage Warning Settings ************************/
  244. //#define AUTOCELL // Uncomment this to use varying cell count batteries. Overrides GUI/OSD voltage warning settings. Uses CELL_VOLTS_* below unless AUTOCELL_ALARM defined
  245. //#define AUTOCELL_ALARM // Use with Autocell - uses the Main battery Alarm value on GUI OSD instead of CELL_VOLTS_WARN. Main battery Alarm is a per cell value instead of full battery. i.e. 3.4 = 10.2v on a 3s
  246. //The following variables are available for adjustment unless using FC_VOLTAGE_CONFIG
  247. #define CELL_VOLTS_WARN 35 // Specify the cell voltage level at which low voltage warning takes place eg. 35 = 3.5 volts per cell
  248. #define CELL_VOLTS_MIN 34 // Specify the cell voltage at which it is considered empty
  249. #define CELL_VOLTS_MAX 42 // Specify the max normal LIPO cell voltage
  250. //#define FC_VOLTAGE_CONFIG // Additionally uncomment this if you want to use the vbat voltage config with BASEFLIGHT and CLEANFLIGHT on the flight controller (include: min cell voltage, max cell voltage and warning cell voltage)
  251.  
  252.  
  253. /******************** Battery Status Settings ************************/
  254. // This works in conjunction with the GUI switch "Display Battery Status
  255. // Enable to use a battery icon that indicates capacity remaining dependant upon battery voltage or mAh used. Or both if required.
  256. #define BATTERYICONVOLTS //Enable to use with voltage as indicator of capacity remaining
  257. //#define BATTERYICONAMPS //Enable to use with mAh used percentage of AMPHR alarm limit. Warning will now be at 80% of that GUI value
  258.  
  259.  
  260. /******************** FrSky S.Port settings *********************/
  261. //enables data transfer from frsky reciever s.port to osd via multiwii
  262. //requires serial inverter cable & multiwii with s.port code
  263. //Auto detected cell graph from s.port, 16 steps @ 0.05v
  264. //To show battery voltage from s.port, enable "Use MWii" under "Main Voltage" in GUI
  265. //To show amperage from s.port, enable "Use MWii" under Amperage in GUI
  266. //more details: http://code.google.com/p/scarab-osd/wiki/Frsky_SPort
  267. #define MIN_CELL 320 //Cell Low Flash - No decimal, 3 Digits ie 320 = 3.20v
  268.  
  269.  
  270. /******************** TEMPERATURE settings *********************/
  271. //#define TEMPSENSOR // Enable if you have a hardware temperature sensor - e.g. LM35 **UNTESTED**
  272. #define TEMPERATUREMAX 50 // Temperature warning value
  273. #define TEMPZERO 0 // Temperature Zero calibration (range = 0-1024 :512 = 2.5v with vref of 5v and 0.55v for vref of 1.1v)
  274. #define TEMPMAX 500 // Temperature when at sensor output at VCC. Might be atheoreticla value
  275.  
  276.  
  277. /******************** RECORD CAPTURE settings *********************/
  278. // This is used for those who are attempting records to always show the maximum achieved.
  279. // Maximum values (as shown on statistics summary screen will be displayed on line IMMEDAITELY BELOW where current live data is displayed
  280. // It may require layouts to be amended to show data without overwriting other information
  281. //#define SHOW_MAX_SPEED // Enable to display MAX speed achieved on line below current speed
  282. //#define SHOW_MAX_ALTITUDE // Enable to display MAX altitude achieved on line below current altitude
  283.  
  284.  
  285. /******************** THROTTLE calibration settings *********************/
  286. // This is used for those who want to specify non default throttle calibration values.
  287. // To use comment out AUTOTHROTTLE and adjusts the maximum and minimum throttle values
  288. #define AUTOTHROTTLE
  289. #define HIGHTHROTTLE 1900 // Maximum recognised value for throttle
  290. #define LOWTHROTTLE 1100 // Minimum recognised value for throttle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement