diff --git a/tracker/software/protocols/packet/aprs.c b/tracker/software/protocols/packet/aprs.c index 171fa9c3..3effafb0 100644 --- a/tracker/software/protocols/packet/aprs.c +++ b/tracker/software/protocols/packet/aprs.c @@ -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")) { diff --git a/tracker/software/threads/collector.c b/tracker/software/threads/collector.c index be2bc5aa..7193d5a6 100644 --- a/tracker/software/threads/collector.c +++ b/tracker/software/threads/collector.c @@ -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);