fixed merge conflicts

This commit is contained in:
2021-06-24 18:01:09 +02:00
12 changed files with 504 additions and 360 deletions

View File

@ -49,10 +49,26 @@ ReturnValue_t GPSHandler::buildCommandFromCommand(
ReturnValue_t GPSHandler::scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) {
// Pass data to GPS library
int result = lwgps_process(&gpsData, start, len);
if(result != 0) {
sif::warning << "GPSHandler::scanForReply: Issue processing GPS data with lwgps"
<< std::endl;
if(len > 0) {
sif::info << "GPSHandler::scanForReply: Received " << len << " bytes" << std::endl;
if (internalState == InternalStates::WAIT_FIRST_MESSAGE) {
// TODO: Check whether data is valid by chcking whether NMEA start string is valid
commandExecuted = true;
}
int result = lwgps_process(&gpsData, start, len);
if(result != 1) {
sif::warning << "GPSHandler::scanForReply: Issue processing GPS data with lwgps"
<< std::endl;
}
else {
sif::info << "GPS Data" << std::endl;
// Print messages
printf("Valid status: %d\n", gpsData.is_valid);
printf("Latitude: %f degrees\n", gpsData.latitude);
printf("Longitude: %f degrees\n", gpsData.longitude);
printf("Altitude: %f meters\n", gpsData.altitude);
}
*foundLen = len;
}
return HasReturnvaluesIF::RETURN_OK;