// Process all bytes available from the stream // bool apm::AP_GPS_GSOF::read(void) { uint32_t now = quan::stm32::millis().numeric_value(); if (gsofmsgreq_index < (sizeof(gsofmsgreq))) { if (now > gsofmsg_time) { requestGSOF(gsofmsgreq[gsofmsgreq_index], 0); requestGSOF(gsofmsgreq[gsofmsgreq_index], 3); gsofmsg_time = now + 110; gsofmsgreq_index++; } } bool ret = false; while (gps.port->available() > 0) { uint8_t temp = gps.port->read(); ret |= parse(temp); } return ret; }
// Process all bytes available from the stream // bool AP_GPS_GSOF::read(void) { uint32_t now = AP_HAL::millis(); if (gsofmsgreq_index < (sizeof(gsofmsgreq))) { if (now > gsofmsg_time) { requestGSOF(gsofmsgreq[gsofmsgreq_index], 0); requestGSOF(gsofmsgreq[gsofmsgreq_index], 3); gsofmsg_time = now + 110; gsofmsgreq_index++; } } bool ret = false; while (port->available() > 0) { uint8_t temp = port->read(); ret |= parse(temp); } return ret; }