- ao_records_read++;
- ao_insert();
- return;
- case 'G':
- ao_gps_prev = ao_gps_static;
- ao_gps_static.tick = tick;
- ao_gps_static.latitude = int32(bytes, 0);
- ao_gps_static.longitude = int32(bytes, 4);
- {
- int32_t altitude = int32(bytes, 8);
- AO_TELEMETRY_LOCATION_SET_ALTITUDE(&ao_gps_static, altitude);
- }
- ao_gps_static.flags = bytes[13];
- if (!ao_gps_count)
- ao_gps_first = ao_gps_static;
- ao_gps_count++;
- break;
- }
- continue;
- } else if (nword == 3 && strcmp(words[0], "ms5607") == 0) {
- if (strcmp(words[1], "reserved:") == 0)
- ao_ms5607_prom.reserved = strtoul(words[2], NULL, 10);
- else if (strcmp(words[1], "sens:") == 0)
- ao_ms5607_prom.sens = strtoul(words[2], NULL, 10);
- else if (strcmp(words[1], "off:") == 0)
- ao_ms5607_prom.off = strtoul(words[2], NULL, 10);
- else if (strcmp(words[1], "tcs:") == 0)
- ao_ms5607_prom.tcs = strtoul(words[2], NULL, 10);
- else if (strcmp(words[1], "tco:") == 0)
- ao_ms5607_prom.tco = strtoul(words[2], NULL, 10);
- else if (strcmp(words[1], "tref:") == 0)
- ao_ms5607_prom.tref = strtoul(words[2], NULL, 10);
- else if (strcmp(words[1], "tempsens:") == 0)
- ao_ms5607_prom.tempsens = strtoul(words[2], NULL, 10);
- else if (strcmp(words[1], "crc:") == 0)
- ao_ms5607_prom.crc = strtoul(words[2], NULL, 10);
- continue;
- } else if (nword >= 3 && strcmp(words[0], "Pyro") == 0) {
- int p = strtoul(words[1], NULL, 10);
- int i, j;
- struct ao_pyro *pyro = &ao_config.pyro[p];
-
- for (i = 2; i < nword; i++) {
- for (j = 0; j < NUM_PYRO_VALUES; j++)
- if (!strcmp (words[i], ao_pyro_values[j].name))
- break;
- if (j == NUM_PYRO_VALUES)
- continue;
- pyro->flags |= ao_pyro_values[j].flag;
- if (ao_pyro_values[j].offset != NO_VALUE && i + 1 < nword) {
- int16_t val = strtoul(words[++i], NULL, 10);
- printf("pyro %d condition %s value %d\n", p, words[i-1], val);
- *((int16_t *) ((char *) pyro + ao_pyro_values[j].offset)) = val;
- }
- }
- }