mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
Fix to reduce errors when opening gps config
This commit is contained in:
parent
2d0b78d497
commit
214a402368
@ -30,6 +30,13 @@ bool GpsService::getGpsConfigurations(std::vector<hal::gps::GpsConfiguration>& c
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If file does not exist, return empty list
|
||||||
|
if (access(path.c_str(), F_OK) != 0) {
|
||||||
|
TT_LOG_W(TAG, "No configurations (file not found: %s)", path.c_str());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
TT_LOG_I(TAG, "Reading configuration file %s", path.c_str());
|
||||||
auto reader = file::ObjectFileReader(path, sizeof(hal::gps::GpsConfiguration));
|
auto reader = file::ObjectFileReader(path, sizeof(hal::gps::GpsConfiguration));
|
||||||
if (!reader.open()) {
|
if (!reader.open()) {
|
||||||
TT_LOG_E(TAG, "Failed to open configuration file");
|
TT_LOG_E(TAG, "Failed to open configuration file");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user