use sensor based on precompile directive

This commit is contained in:
Nicu Hodos 2022-01-01 18:11:33 +01:00
parent 2d4dc652c2
commit fdc9dd452d
2 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@ lib_deps =
lib_extra_dirs =
../libraries
~/Arduino/libraries
build_flags = -D DHT_SENSOR=0
upload_protocol = stk500v1
upload_flags =
-P$UPLOAD_PORT

View File

@ -9,7 +9,7 @@
// Pins
#define SENDER PIN_B2
#if !DHT
#if !DHT_SENSOR
TempSensor &tempSensor = *(new Tmp36Sensor(TEMP_SENSOR));
#else
TempSensor& tempSensor = *(new Dht22Sensor(TEMP_SENSOR));