Skip to content

Commit

Permalink
Ros refactored (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide authored Dec 14, 2023
1 parent 1b273fb commit 3f97633
Show file tree
Hide file tree
Showing 111 changed files with 16,167 additions and 15,558 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/snap_core20.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: snap_core20
on:
push:
tags:
- '*'
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
outputs:
snap-file: ${{ steps.build-snap20.outputs.snap }}
steps:
- uses: actions/checkout@v2
with:
# full history for latest tag name
fetch-depth: 0
- run: mv snap_core20 snap
- uses: snapcore/action-build@v1
id: build-snap20

# Make sure the snap is installable
- run: |
sudo snap install --dangerous ${{ steps.build-snap20.outputs.snap }}
- uses: actions/upload-artifact@v3
with:
name: plotjuggler-snap20
path: ${{ steps.build-snap20.outputs.snap }}

publish:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: plotjuggler-snap20
path: .
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{needs.build.outputs.snap-file}}
release: ${{ startsWith(github.ref, 'refs/tags/') && 'candidate' || 'edge'}}
47 changes: 5 additions & 42 deletions .github/workflows/snap.yaml → .github/workflows/snap_core22.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: snap
name: snap_core22
on:
push:
tags:
Expand All @@ -12,43 +12,6 @@ on:

jobs:
build:
runs-on: ubuntu-latest
outputs:
snap-file: ${{ steps.build-snap.outputs.snap }}
steps:
- uses: actions/checkout@v2
with:
# full history for latest tag name
fetch-depth: 0
- uses: snapcore/action-build@v1
id: build-snap

# Make sure the snap is installable
- run: |
sudo snap install --dangerous ${{ steps.build-snap.outputs.snap }}
- uses: actions/upload-artifact@v3
with:
name: plotjuggler-snap
path: ${{ steps.build-snap.outputs.snap }}

publish:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: plotjuggler-snap
path: .
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{needs.build.outputs.snap-file}}
release: ${{ startsWith(github.ref, 'refs/tags/') && 'candidate' || 'edge'}}

build22:
runs-on: ubuntu-latest
outputs:
snap-file: ${{ steps.build-snap22.outputs.snap }}
Expand All @@ -57,7 +20,7 @@ jobs:
with:
# full history for latest tag name
fetch-depth: 0
- run: rm -r snap && mv snap_core22 snap
- run: mv snap_core22 snap
- uses: snapcore/action-build@v1
id: build-snap22

Expand All @@ -70,10 +33,10 @@ jobs:
name: plotjuggler-snap22
path: ${{ steps.build-snap22.outputs.snap }}

publish22:
publish:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: build22
needs: build
steps:
- uses: actions/download-artifact@v3
with:
Expand All @@ -83,5 +46,5 @@ jobs:
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{needs.build22.outputs.snap-file}}
snap: ${{needs.build.outputs.snap-file}}
release: humble/${{ startsWith(github.ref, 'refs/tags/') && 'candidate' || 'edge'}}
2 changes: 1 addition & 1 deletion 3rdparty/data_tamer_parser/data_tamer_parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ inline bool ParseSnapshot(const Schema& schema, SnapshotView snapshot,
const auto& field = schema.fields[i];
if (GetBit(snapshot.active_mask, i))
{
ParseSnapshotRecursive(field, schema.custom_types, buffer, callback_number, "");
ParseSnapshotRecursive(field, schema.custom_types, buffer, callback_number, {});
}
}
return true;
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ set(PLOTJUGGLER_BASE_SRC
plotjuggler_base/src/plotpanner.cpp
plotjuggler_base/src/timeseries_qwt.cpp
plotjuggler_base/src/reactive_function.cpp
plotjuggler_base/src/special_messages.cpp
)

qt5_wrap_cpp(PLOTJUGGLER_BASE_MOCS
Expand Down
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<depend>libzmq3-dev</depend>
<depend>lz4</depend>
<depend>libzstd-dev</depend>
<depend>protobuf-dev</depend>

<!-- The export tag contains other, unspecified, tags -->
<export>
Expand Down
16 changes: 11 additions & 5 deletions plotjuggler_base/include/PlotJuggler/messageparser_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@

#include <QtPlugin>
#include <QApplication>
#include <array>
#include <unordered_map>
#include <unordered_set>
#include <functional>
#include <map>
#include <set>
#include "PlotJuggler/plotdata.h"
#include "PlotJuggler/pj_plugin.h"

Expand Down Expand Up @@ -109,6 +104,16 @@ class MessageParser
return _clamp_large_arrays;
}

virtual bool useEmbeddedTimestamp() const
{
return _use_embedded_timestamp;
}

virtual void enableEmbeddedTimestamp(bool enable)
{
_use_embedded_timestamp = enable;
}

protected:
PlotDataMapRef& _plot_data;
std::string _topic_name;
Expand All @@ -125,6 +130,7 @@ class MessageParser
private:
bool _clamp_large_arrays = false;
unsigned _max_array_size = 10000;
bool _use_embedded_timestamp = false;
};

using MessageParserPtr = std::shared_ptr<MessageParser>;
Expand Down
Loading

0 comments on commit 3f97633

Please sign in to comment.