From 35005a0e5442a5650c50f25891e80b1ac8a30d2a Mon Sep 17 00:00:00 2001 From: SonOfGib Date: Thu, 24 Oct 2024 22:46:07 -0400 Subject: [PATCH] Readme notes about building. * Libgps version update --- Readme.md | 19 +++++++++++++++++++ src/autoapp/Service/SensorService.cpp | 5 ++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 2deb2eb..d59e159 100644 --- a/Readme.md +++ b/Readme.md @@ -48,5 +48,24 @@ Copyrights (c) 2018 f1x.studio (Michal Szwaj) - Broadcom ilclient from RaspberryPI 3 firmware - OpenMAX IL API +### Building +#### Amd64 +Install the packages specified in the [prebuilts](https://github.com/opencardev/prebuilts) repository. Qt5 is required, versions packaged in modern Ubuntu and Debian +seem to work fine. + +You will also likely need to install the udev rules from `prebuilts` + +You need to point some CMAKE variables at your `aasdk` files. +```text +-DAASDK_INCLUDE_DIRS=/include +-DAASDK_LIBRARIES=/lib/libaasdk.so + DAASDK_PROTO_INCLUDE_DIRS= +-DAASDK_PROTO_LIBRARIES=/lib/libaasdk_proto.so +``` + +#### Raspberry Pi +Just run the scripts in the `prebuilts` repository for `aasdk` and `openauto`. It is possible to cross compile if your raspberry pi is too slow to compile the code itself. +However, its easiest to just develop on a more capable `amd64` device. + ### Remarks **This software is not certified by Google Inc. It is created for R&D purposes and may not work as expected by the original authors. Do not use while driving. You use this software at your own risk.** diff --git a/src/autoapp/Service/SensorService.cpp b/src/autoapp/Service/SensorService.cpp index 851744e..7a47d6c 100644 --- a/src/autoapp/Service/SensorService.cpp +++ b/src/autoapp/Service/SensorService.cpp @@ -188,7 +188,7 @@ void SensorService::sendGPSLocationData() auto * locInd = indication.add_gps_location(); // epoch seconds - locInd->set_timestamp(this->gpsData_.fix.time * 1e3); + locInd->set_timestamp(this->gpsData_.fix.time.tv_sec); // degrees locInd->set_latitude(this->gpsData_.fix.latitude * 1e7); locInd->set_longitude(this->gpsData_.fix.longitude * 1e7); @@ -229,8 +229,7 @@ void SensorService::sensorPolling() if ((this->gpsEnabled_) && (gps_waiting(&this->gpsData_, 0)) && - (gps_read(&this->gpsData_) > 0) && - (this->gpsData_.status != STATUS_NO_FIX) && + (gps_read(&this->gpsData_, nullptr, 0) > 0) && (this->gpsData_.fix.mode == MODE_2D || this->gpsData_.fix.mode == MODE_3D) && (this->gpsData_.set & TIME_SET) && (this->gpsData_.set & LATLON_SET))