From e333f53c80f81d493988e7ed1e99f11ffdb3beb2 Mon Sep 17 00:00:00 2001 From: Wolfgang Kracht Date: Fri, 21 Sep 2018 21:00:49 +0200 Subject: [PATCH] Rename WTDecoder.h to Funkthermometer/WTDecoder.h --- WTDecoder.h => Funkthermometer/WTDecoder.h | 82 +++++++++++----------- 1 file changed, 41 insertions(+), 41 deletions(-) rename WTDecoder.h => Funkthermometer/WTDecoder.h (95%) diff --git a/WTDecoder.h b/Funkthermometer/WTDecoder.h similarity index 95% rename from WTDecoder.h rename to Funkthermometer/WTDecoder.h index 7e9f2c2..478ee6d 100644 --- a/WTDecoder.h +++ b/Funkthermometer/WTDecoder.h @@ -1,42 +1,42 @@ -#include - -#define WTD_DEBUG -//#define WTD_DEBUG_VERBOSE -//#define VALID_TX_ID_ONLY - -// WeMos D1 mini -#define INT_PIN D2 // GPIO0 -#ifdef WTD_DEBUG -#define LED_PIN D4 // GPIO2 -#endif - -#define MAX_CODES 20 -#define MAX_RECORDS 20 - -class WTDecoder { -public: - struct rec - { - bool valid; // record is valid - byte txid; // transmitter ID random when battery gets inserted - bool battery; // 1 if battery is low - bool button; // true if was triggerd by tx transmit button - byte channel; // channel switch of transmitter 1,2,3 - int16_t temprature; // terperature in 1/10 °C - int16_t humidity; // humidity in % - unsigned long timestamp; - }; - - WTDecoder() {}; - ~WTDecoder() {}; - - void Loop(); - void Setup(); - bool GetRecord(struct rec &record); - -private: - bool decodeRecord(uint64_t value, struct rec &record); - void printRecord(struct rec &record); -}; - +#include + +#define WTD_DEBUG +//#define WTD_DEBUG_VERBOSE +//#define VALID_TX_ID_ONLY + +// WeMos D1 mini +#define INT_PIN D2 // GPIO0 +#ifdef WTD_DEBUG +#define LED_PIN D4 // GPIO2 +#endif + +#define MAX_CODES 20 +#define MAX_RECORDS 20 + +class WTDecoder { +public: + struct rec + { + bool valid; // record is valid + byte txid; // transmitter ID random when battery gets inserted + bool battery; // 1 if battery is low + bool button; // true if was triggerd by tx transmit button + byte channel; // channel switch of transmitter 1,2,3 + int16_t temprature; // terperature in 1/10 °C + int16_t humidity; // humidity in % + unsigned long timestamp; + }; + + WTDecoder() {}; + ~WTDecoder() {}; + + void Loop(); + void Setup(); + bool GetRecord(struct rec &record); + +private: + bool decodeRecord(uint64_t value, struct rec &record); + void printRecord(struct rec &record); +}; + extern WTDecoder wtd;