From 3deba8a662ffa79c7755f02b59a2d21d500e6b52 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 4 Jan 2024 10:42:48 +0100 Subject: [PATCH] Add header file matching library name (#23) * Add header file matching library name This allows the library to be correctly selected using the proper include file instead of DHT.h (that may lead to the inclusion of another DHT library). This is the releavnt WARNING after running arduino-lint: Linting library in /home/megabug/Workspace/Grove_Temperature_And_Humidity_Sensor WARNING: No header file found matching library name (Grove_Temperature_And_Humidity_Sensor.h). Best practices are for primary header filename to match library name. See: https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format (Rule LS008) * Release version 2.0.2 --- Grove_Temperature_And_Humidity_Sensor.h | 2 ++ examples/DHTtester/DHTtester.ino | 2 +- library.properties | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 Grove_Temperature_And_Humidity_Sensor.h diff --git a/Grove_Temperature_And_Humidity_Sensor.h b/Grove_Temperature_And_Humidity_Sensor.h new file mode 100644 index 0000000..d665e6b --- /dev/null +++ b/Grove_Temperature_And_Humidity_Sensor.h @@ -0,0 +1,2 @@ +#include "DHT.h" + diff --git a/examples/DHTtester/DHTtester.ino b/examples/DHTtester/DHTtester.ino index bd619d7..1c524b3 100644 --- a/examples/DHTtester/DHTtester.ino +++ b/examples/DHTtester/DHTtester.ino @@ -1,7 +1,7 @@ // Example testing sketch for various DHT humidity/temperature sensors // Written by ladyada, public domain -#include "DHT.h" +#include "Grove_Temperature_And_Humidity_Sensor.h" // Uncomment whatever type you're using! //#define DHTTYPE DHT11 // DHT 11 diff --git a/library.properties b/library.properties index 9b5232e..c95bfe4 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Grove Temperature And Humidity Sensor -version=2.0.1 +version=2.0.2 author=Seeed Studio maintainer=Seeed Studio sentence=Arduino library to control Grove Temperature And Humidity Sensor, it contains chip DHT11 AM2302.