diff options
| -rw-r--r-- | src/core/ao_flight.c | 11 | ||||
| -rw-r--r-- | src/test/ao_flight_test.c | 4 | 
2 files changed, 15 insertions, 0 deletions
| diff --git a/src/core/ao_flight.c b/src/core/ao_flight.c index 5e194638..494e656d 100644 --- a/src/core/ao_flight.c +++ b/src/core/ao_flight.c @@ -223,6 +223,17 @@ ao_flight(void)  #endif  		case ao_flight_coast: +			/* +			 * By customer request - allow the user +			 * to lock out apogee detection for a specified +			 * number of seconds. +			 */ +			if (ao_config.apogee_lockout) { +				if ((ao_sample_tick - ao_boost_tick) < +				    AO_SEC_TO_TICKS(ao_config.apogee_lockout)) +					break; +			} +  			/* apogee detect: coast to drogue deploy:  			 *  			 * speed: < 0 diff --git a/src/test/ao_flight_test.c b/src/test/ao_flight_test.c index 921d44e7..4a8625cf 100644 --- a/src/test/ao_flight_test.c +++ b/src/test/ao_flight_test.c @@ -184,6 +184,7 @@ struct ao_config {  	int16_t		accel_plus_g;  	int16_t		accel_minus_g;  	uint8_t		pad_orientation; +	uint16_t	apogee_lockout;  };  #define AO_PAD_ORIENTATION_ANTENNA_UP	0 @@ -523,6 +524,9 @@ ao_sleep(void *wchan)  				ao_config.accel_minus_g = atoi(words[5]);  			} else if (nword >= 4 && strcmp(words[0], "Main") == 0) {  				ao_config.main_deploy = atoi(words[2]); +			} else if (nword >= 3 && strcmp(words[0], "Apogee") == 0 && +				   strcmp(words[1], "lockout:") == 0) { +				ao_config.apogee_lockout = atoi(words[2]);  			} else if (nword >= 36 && strcmp(words[0], "CALL") == 0) {  				tick = atoi(words[10]);  				if (!ao_flight_started) { | 
