diff --git a/MW_OSD/Config.h b/MW_OSD/Config.h index 9b181e9c..bb48758f 100644 --- a/MW_OSD/Config.h +++ b/MW_OSD/Config.h @@ -113,10 +113,12 @@ /******************** GPS OSD settings (GPS / NAZA) *********************/ -#define GPSHOMEFIX 50 // Number of consecutive valid fixes before home will be set. 50@ 10hz = 5 seconds of valid fixes. -#define HOMESATFIX 6 // Minimum number of sats required when setting initial home location. -#define GPSOSDARMDISTANCE 20 // distance from home in meters when GPSOSD arms. Starts flight timer etc. +#define GPSHOMEFIX 50 // Number of consecutive valid fixes before home will be set. 50@ 10hz = 5 seconds of valid fixes. +#define HOMESATFIX 6 // Minimum number of sats required when setting initial home location. +#define GPSOSDARMDISTANCE 20 // distance from home in meters when GPSOSD arms. Starts flight timer etc. #define GPSOSDHOMEDISTANCE 40 // distance from home in meters when GPSOSD is home. When speed is low it disarms and displays summary screen. +#define GPSOSDSUMMARY 60 // seconds summary is displayed for after landing. +#define GPSOSDLANDED 7 // seconds OSD needs to have landed (within home distance and speed less than xxx) before triggering summary. //#define GPSDOP 300 // UBLOX only - minimum PDOP required for sat fix. A DOP of 2.00 is considered good //#define DISPLAYDOP // UBLOX only - display DOP when its bad - above GPSDOP. Uses and requires temperature position to be enabled //#define PWM_OSD_SWITCH // Enables 3 way screen switch using a TX channel via a RX channel connected to the OSD PWM input pin (RSSI pin on basic MINIM hardware). diff --git a/MW_OSD/GPS.ino b/MW_OSD/GPS.ino index 730edf55..6d0a1c9e 100644 --- a/MW_OSD/GPS.ino +++ b/MW_OSD/GPS.ino @@ -219,9 +219,9 @@ void GPS_NewData() { if (GPS_armedangleset == 1) { if ((GPS_distanceToHome < GPSOSDHOMEDISTANCE) && (GPS_speed < 75)) { - if ((GPS_home_timer + 7000) > millis()) { + if ((GPS_home_timer + (GPSOSDLANDED*1000) > millis()) { } - else if ((GPS_home_timer + 22000) > millis()) { + else if ((GPS_home_timer + (GPSOSDSUMMARY*1000)) > millis()) { configPage = 0; armed = 0; } diff --git a/MW_OSD/GlobalVariables.h b/MW_OSD/GlobalVariables.h index 94f48523..6ffc956b 100644 --- a/MW_OSD/GlobalVariables.h +++ b/MW_OSD/GlobalVariables.h @@ -277,7 +277,6 @@ uint8_t variopitch=0; // Canvas mode #ifdef CANVAS_SUPPORT bool canvasMode = false; -bool canvasFirst = true; uint32_t lastCanvas = 0; #define CANVAS_TIMO 2000 // Canvas mode timeout in msec. #endif diff --git a/MW_OSD/MW_OSD.ino b/MW_OSD/MW_OSD.ino index 9928dde3..b66d1865 100644 --- a/MW_OSD/MW_OSD.ino +++ b/MW_OSD/MW_OSD.ino @@ -557,18 +557,6 @@ void loop() MAX7456_ClearScreen(); canvasMode = false; } - - // Place a small indicator for canvas mode to detect spurious - // canvas requests. - // In a normal situation, It should go away on the very first - // clear screen request, but may remain until next clear screen - // if the begin and the first clear request comes in back-to-back - // before the indicator is drawn. - - if (canvasFirst) { - MAX7456_WriteString("*", (LINE01+01)); - canvasFirst = false; - } } #endif else diff --git a/MW_OSD/Serial.ino b/MW_OSD/Serial.ino index bcd4e57f..a1852207 100644 --- a/MW_OSD/Serial.ino +++ b/MW_OSD/Serial.ino @@ -357,7 +357,6 @@ For sub-command 3 (draw string): case 1: // Exit canvas mode canvasMode = false; - canvasFirst = true; break; case 2: // Clear canvas diff --git a/platformio.ini b/platformio.ini index 671c5ad1..46ab080e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ src_dir=MW_OSD -# UTILITIES ######################################################################## +# UTILITIES #################################################################### [env:utilities.eeprom.clear] platform = atmelavr @@ -53,7 +53,11 @@ framework = arduino board = pro16MHzatmega328 src_build_flags = -DPIODEBUG -DPX4 -# MINIM BOARDS ######################################################################## + +# MINIM BOARDS ################################################################# +# MINIM BOARDS ################################################################# + +# MINIM BOARDS MULTIROTOR ###################################################### [env:minim.betaflight.multirotor] platform = atmelavr framework = arduino @@ -114,8 +118,7 @@ framework = arduino board = pro16MHzatmega328 src_build_flags = -DMINIMOSD -DRACEFLIGHT - -# MINIM BOARDS AERO ######################################################################## +# MINIM BOARDS AERO ############################################################ [env:minim.inav.aero] platform = atmelavr framework = arduino @@ -140,9 +143,7 @@ framework = arduino board = pro16MHzatmega328 src_build_flags = -DMINIMOSD -DFIXEDWING_BF_SERVO -DFIXEDWING - - -# MINIM BOARDS GPSOSD ######################################################################## +# MINIM BOARDS GPSOSD ########################################################## [env:minim.gpsosd.ublox] platform = atmelavr framework = arduino @@ -161,18 +162,18 @@ framework = arduino board = pro16MHzatmega328 src_build_flags = -DMINIMOSD -DGPSOSD_MTK - - -# MINIM BOARDS SPECIALS ######################################################################## -[env:minim.nocontroller] +# MINIM BOARDS SPECIALS ######################################################## +[env:minim.standalone] platform = atmelavr framework = arduino board = pro16MHzatmega328 src_build_flags = -DMINIMOSD -DNOCONTROLLER +# AEROMAX BOARDS ############################################################### +# AEROMAX BOARDS ############################################################### -# AEROMAX BOARDS ######################################################################## +# AEROMAX BOARDS MULTIROTOR #################################################### [env:aeromax.betaflight.multirotor] platform = atmelavr framework = arduino @@ -203,6 +204,37 @@ framework = arduino board = pro16MHzatmega328 src_build_flags = -DAEROMAX -DPX4 +[env:aeromax.multiwii.multirotor] +platform = atmelavr +framework = arduino +board = pro16MHzatmega328 +src_build_flags = -DAEROMAX -DMULTIWII + +[env:aeromax.kiss.multirotor] +platform = atmelavr +framework = arduino +board = pro16MHzatmega328 +src_build_flags = -DAEROMAX -DKISS + +[env:aeromax.dronin.multirotor] +platform = atmelavr +framework = arduino +board = pro16MHzatmega328 +src_build_flags = -DAEROMAX -DDRONIN + +[env:aeromax.librepilot.multirotor] +platform = atmelavr +framework = arduino +board = pro16MHzatmega328 +src_build_flags = -DAEROMAX -DLIBREPILOT + +[env:aeromax.raceflight.multirotor] +platform = atmelavr +framework = arduino +board = pro16MHzatmega328 +src_build_flags = -DAEROMAX -DRACEFLIGHT + +# AEROMAX BOARDS AERO ########################################################## [env:aeromax.inav.aero] platform = atmelavr framework = arduino @@ -227,9 +259,37 @@ framework = arduino board = pro16MHzatmega328 src_build_flags = -DAEROMAX -DFIXEDWING_BF_SERVO -DFIXEDWING +# AEROMAX BOARDS GPSOSD ######################################################## +[env:aeromax.gpsosd.ublox] +platform = atmelavr +framework = arduino +board = pro16MHzatmega328 +src_build_flags = -DAEROMAX -DGPSOSD_UBLOX + +[env:aeromax.gpsosd.nmea] +platform = atmelavr +framework = arduino +board = pro16MHzatmega328 +src_build_flags = -DAEROMAX -DGPSOSD_NMEA + +[env:aeromax.gpsosd.mtk] +platform = atmelavr +framework = arduino +board = pro16MHzatmega328 +src_build_flags = -DAEROMAX -DGPSOSD_MTK + +# AEROMAX BOARDS SPECIALS ###################################################### +[env:aeromax.standalone] +platform = atmelavr +framework = arduino +board = pro16MHzatmega328 +src_build_flags = -DAEROMAX -DNOCONTROLLER + +# AANDROMEDA BOARDS ############################################################ +# AEROMAX BOARDS ############################################################### -# ANDROMEDA BOARDS ######################################################################## +# ANDROMEDA BOARDS ############################################################# [env:andromeda.betaflight.multirotor] platform = atmelavr framework = arduino