Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding condition checking if a payload is a device uplink. #95

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions decoders/connector/khomp/its-402/v1.0.0/payload.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
/**
* Payload Parser ITS 402 - Tago.io
* v2.0 28/10/21
*
*
* Copyright (C) 2021 Khomp, Inc - All rights Reserved.
*/
const FIX_COMMAND_TIME = 1;
Expand Down Expand Up @@ -232,4 +232,12 @@ if (language_obj) {
} else {
console.log("Language not found, using EN as fallback. Set Configuration Parameters 'language' with params: 'EN', 'PT', 'raw'.");
}
payload = parsePayload(payload);

const decodeData = payload.find(
(x) =>
x.variable === "bn"
);

if (decodeData) {
payload = parsePayload(payload);
}