kopia lustrzana https://github.com/DL7AD/pecanpico10
Check BMEi1 is OK when using air pressure to control GPS airborne mode
rodzic
061fc953ab
commit
1bd45ac9d5
|
@ -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")) {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue