From 4356b67a0aa7d014e8028b4367b20586f9918d06 Mon Sep 17 00:00:00 2001 From: Matthias Prinke Date: Sun, 28 Apr 2024 10:01:30 +0200 Subject: [PATCH] File header corrections --- src/AppLayer.cpp | 13 +++++++++---- src/AppLayer.h | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/AppLayer.cpp b/src/AppLayer.cpp index 22431ea..40fc346 100644 --- a/src/AppLayer.cpp +++ b/src/AppLayer.cpp @@ -1,7 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// payload.cpp +// AppLayer.cpp // -// Create data payload from sensor or simulated data +// LoRaWAN node application layer +// +// - Create data payload from sensor or simulated data +// - Decode sensor specific commands +// - Encode sensor specific status responses +// - Retain sensor specific parameters // // This implementation is specific for the BresserWeatherSensorLW project // @@ -123,12 +128,12 @@ AppLayer::decodeDownlink(uint8_t port, uint8_t *payload, size_t size) weatherSensor.setSensorsExc(payload, size); } +#if defined(MITHERMOMETER_EN) || defined(THEENGSDECODER_EN) if ((port == CMD_GET_BLE_CONFIG) && (payload == 0x00) && (size == 1)) { log_d("Get BLE config"); return CMD_GET_BLE_CONFIG; } - -#if defined(MITHERMOMETER_EN) || defined(THEENGSDECODER_EN) + if ((port == CMD_SET_BLE_CONFIG) && (size == 2)) { appPrefs.begin("BWS-LW-APP", false); diff --git a/src/AppLayer.h b/src/AppLayer.h index cc378e9..157132d 100644 --- a/src/AppLayer.h +++ b/src/AppLayer.h @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////// -// payload.h +// AppLayer.h // -// Create data payload from sensor or simulated data +// LoRaWAN node application layer // // created: 04/2024 //