add command line arg to collect all waypoints
This commit is contained in:
@ -41,6 +41,11 @@ const optionsList = [
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
description: "This option will save all received text messages to the database.",
|
description: "This option will save all received text messages to the database.",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "collect-waypoints",
|
||||||
|
type: Boolean,
|
||||||
|
description: "This option will save all received waypoints to the database.",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "decryption-keys",
|
name: "decryption-keys",
|
||||||
type: String,
|
type: String,
|
||||||
@ -85,6 +90,7 @@ const mqttUsername = options["mqtt-username"] ?? "meshdev";
|
|||||||
const mqttPassword = options["mqtt-password"] ?? "large4cats";
|
const mqttPassword = options["mqtt-password"] ?? "large4cats";
|
||||||
const collectServiceEnvelopes = options["collect-service-envelopes"] ?? false;
|
const collectServiceEnvelopes = options["collect-service-envelopes"] ?? false;
|
||||||
const collectTextMessages = options["collect-text-messages"] ?? false;
|
const collectTextMessages = options["collect-text-messages"] ?? false;
|
||||||
|
const collectWaypoints = options["collect-waypoints"] ?? true;
|
||||||
const decryptionKeys = options["decryption-keys"] ?? [
|
const decryptionKeys = options["decryption-keys"] ?? [
|
||||||
"1PG7OiApB1nwvP+rz05pAQ==", // add default "AQ==" decryption key
|
"1PG7OiApB1nwvP+rz05pAQ==", // add default "AQ==" decryption key
|
||||||
];
|
];
|
||||||
@ -349,7 +355,7 @@ client.on("message", async (topic, message) => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(portnum === 8) {
|
else if(portnum === 8 && collectWaypoints) {
|
||||||
|
|
||||||
const waypoint = Waypoint.decode(envelope.packet.decoded.payload);
|
const waypoint = Waypoint.decode(envelope.packet.decoded.payload);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user