Skip to content

Commit

Permalink
fix bug in VDO downsampler
Browse files Browse the repository at this point in the history
  • Loading branch information
jvde-github committed Mar 4, 2025
1 parent 13cf114 commit c9e31e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions IO/Network.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ namespace IO
class TCPClientStreamer : public OutputMessage
{
::TCP::Client tcp;
AIS::Filter filter;
//AIS::Filter filter;
bool JSON = false;
std::string host, port;
bool keep_alive = false;
Expand Down Expand Up @@ -208,7 +208,7 @@ namespace IO
class TCPlistenerStreamer : public OutputMessage, public TCP::Server
{
int port = 5010;
AIS::Filter filter;
//AIS::Filter filter;
bool JSON = false;

public:
Expand Down
9 changes: 6 additions & 3 deletions Library/Message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,12 @@ namespace AIS
{
if (downsample)
{
if (msg.isOwn() && msg.getRxTimeUnix() - last_VDO < downsample_time)
return false;
last_VDO = msg.getRxTimeUnix();
if (msg.isOwn()) {
if (msg.getRxTimeUnix() - last_VDO < downsample_time) {
return false;
}
last_VDO = msg.getRxTimeUnix();
}
}

if (!on)
Expand Down

0 comments on commit c9e31e4

Please sign in to comment.