Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Jul 26, 2023
1 parent f9b2190 commit f5840ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/v2i-hub/CDASimAdapter/src/CDASimConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,15 @@ namespace CDASimAdapter{
if(_sensors_json_v.isArray())
{
std::for_each( _sensors_json_v.begin(), _sensors_json_v.end(), [&result, &sensor_id](auto& item){
if(item["id"] == sensor_id)
if(item["sensor_id"] == sensor_id)
{
result = item;
}
});
}
else if(_sensors_json_v.isObject())
{
if(_sensors_json_v["id"] == sensor_id)
if(_sensors_json_v["sensor_id"] == sensor_id)
{
result = _sensors_json_v;
}
Expand Down
4 changes: 2 additions & 2 deletions src/v2i-hub/CDASimAdapter/test/sensors.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"id": "SomeID",
"sensor_id": "SomeID",
"type": "SematicLidar",
"location": {
"x": 0.0,
Expand All @@ -15,7 +15,7 @@
"proj_string": "+proj=tmerc +lat_0=38.95197911150576 +lon_0=-77.14835128349988 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +geoidgrids=egm96_15.gtx +vunits=m +no_defs"
},
{
"id": "SomeID2",
"sensor_id": "SomeID2",
"type": "LIDAR",
"location": {
"x": 1.0,
Expand Down

0 comments on commit f5840ff

Please sign in to comment.