little bugfix in main and testing without trace_printf

pull/2/head
Mateusz Lubecki 2018-04-21 07:51:14 +02:00
rodzic 851919e1d7
commit 8f1b05aa5c
3 zmienionych plików z 537 dodań i 537 usunięć

Plik diff jest za duży Load Diff

Wyświetl plik

@ -9,7 +9,7 @@
#define STATION_CONFIG_H_
// Only for debugging
#define _DBG_TRACE
//#define _DBG_TRACE
// Uncomment to enable all meteo functionality. TX20 anemometer, dallas termometer, MS5611 pressure sens
#define _METEO

Wyświetl plik

@ -143,10 +143,13 @@ main(int argc, char* argv[])
#ifdef _METEO
temperature = SensorBringTemperature();
td = DallasQuery();
#ifdef _DBG_TRACE
trace_printf("temperatura DS: %d\r\n", (int)td);
#endif
pressure = (float)SensorBringPressure();
#ifdef _DBG_TRACE
trace_printf("cisnienie MS: %d\r\n", (int)pressure);
#endif
#endif
GPIO_ResetBits(GPIOC, GPIO_Pin_8 | GPIO_Pin_9);
@ -193,6 +196,7 @@ main(int argc, char* argv[])
break;
case DHT22_STATE_DATA_RDY:
dht22_decode(&dht);
break;
case DHT22_STATE_DATA_DECD:
dht_valid = dht; // powrot do stanu DHT22_STATE_IDLE jest w TIM3_IRQHandler
dht22State = DHT22_STATE_DONE;