Check BMEi1 is OK when using air pressure to control GPS airborne mode

pull/4/head
CInsights 2018-04-28 01:39:15 +10:00
rodzic 061fc953ab
commit 1bd45ac9d5
2 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -675,9 +675,9 @@ msg_t aprs_execute_gpio_command(aprs_identity_t *id,
if(argc != 1)
return MSG_ERROR;
char *tok = strtok(argv[0], ":");
/* char *tok = strtok(argv[0], ":");
if(tok == NULL)
return MSG_ERROR;
return MSG_ERROR;*/
/* TODO: WIP to generalize by parsing out the port # and operation. */
if(!strcmp(argv[0], "io1:1")) {

Wyświetl plik

@ -57,8 +57,10 @@ static void aquirePosition(dataPoint_t* tp, dataPoint_t* ltp,
tp->gps_state = GPS_LOWBATT1;
} else {
// Switch on GPS
bool airborne = ltp->sen_i1_press/10 < conf_sram.gps_airborne;
/* Switch on GPS
* If BMEi1 is OK then use air pressure to decide if airborne mode is set.
*/
bool airborne = !(ltp->sys_error & 0x10) && ltp->sen_i1_press/10 < conf_sram.gps_airborne;
TRACE_INFO("COLL > GPS %s in airborne mode", airborne ? "is" : "is not");
bool status = GPS_Init(airborne);