EnviroDIY / EnviroDIY_Mayfly_Logger

hardware design files, example code sketches, and documentation for Arduino-framework EnviroDIY Mayfly data logger
https://envirodiy.org/mayfly/
Other
30 stars 26 forks source link

AOSongDHT.h causes cc error #34

Closed neilh10 closed 2 years ago

neilh10 commented 2 years ago

AOSongDHT has compile errors.
I believe this problem is already been seen, but just adding this to track the solution.

There must be a new version of the compiler, and there is a conflict with items in the DHType enum with the same named parts in DHT.h / Define types of sensors. / static const uint8_t DHT11{11}; /< DHT TYPE 11 */ static const uint8_t DHT12{12}; /*< DHY TYPE 12 / static const uint8_t DHT21{21}; /< DHT TYPE 21 */ static const uint8_t DHT22{22}; /*< DHT TYPE 22 / static const uint8_t AM2301{21}; /*< AM2301 /

AOSongDHT.h: typedef enum DHTtype { DHT11 = 11, DHT21 = 21, AM2301 = 21, DHT22 = 22, AM2302 = 22 } DHTtype;

The parts in the enum are not referenced, it looks like it is specified to improve documentation. I solved the cc problem with a rename, this maynot be an ideal long term fix,

typedef enum DHTtype { // should match values in DHT.h, but can have same names eDHT11 = 11, eDHT12 = 12, eDHT21 = 21, eAM2301 = 21, eDHT22 = 22, eAM2302 = 22 } DHTtype;

neilh10 commented 2 years ago

oops sorry its a sw error, wrong rep.