kopia lustrzana https://github.com/SP8EBC/ParaTNC
little bugfix in main and testing without trace_printf
rodzic
851919e1d7
commit
8f1b05aa5c
Plik diff jest za duży
Load Diff
|
@ -9,7 +9,7 @@
|
||||||
#define STATION_CONFIG_H_
|
#define STATION_CONFIG_H_
|
||||||
|
|
||||||
// Only for debugging
|
// Only for debugging
|
||||||
#define _DBG_TRACE
|
//#define _DBG_TRACE
|
||||||
|
|
||||||
// Uncomment to enable all meteo functionality. TX20 anemometer, dallas termometer, MS5611 pressure sens
|
// Uncomment to enable all meteo functionality. TX20 anemometer, dallas termometer, MS5611 pressure sens
|
||||||
#define _METEO
|
#define _METEO
|
||||||
|
|
|
@ -143,10 +143,13 @@ main(int argc, char* argv[])
|
||||||
#ifdef _METEO
|
#ifdef _METEO
|
||||||
temperature = SensorBringTemperature();
|
temperature = SensorBringTemperature();
|
||||||
td = DallasQuery();
|
td = DallasQuery();
|
||||||
|
#ifdef _DBG_TRACE
|
||||||
trace_printf("temperatura DS: %d\r\n", (int)td);
|
trace_printf("temperatura DS: %d\r\n", (int)td);
|
||||||
|
#endif
|
||||||
pressure = (float)SensorBringPressure();
|
pressure = (float)SensorBringPressure();
|
||||||
|
#ifdef _DBG_TRACE
|
||||||
trace_printf("cisnienie MS: %d\r\n", (int)pressure);
|
trace_printf("cisnienie MS: %d\r\n", (int)pressure);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GPIO_ResetBits(GPIOC, GPIO_Pin_8 | GPIO_Pin_9);
|
GPIO_ResetBits(GPIOC, GPIO_Pin_8 | GPIO_Pin_9);
|
||||||
|
@ -193,6 +196,7 @@ main(int argc, char* argv[])
|
||||||
break;
|
break;
|
||||||
case DHT22_STATE_DATA_RDY:
|
case DHT22_STATE_DATA_RDY:
|
||||||
dht22_decode(&dht);
|
dht22_decode(&dht);
|
||||||
|
break;
|
||||||
case DHT22_STATE_DATA_DECD:
|
case DHT22_STATE_DATA_DECD:
|
||||||
dht_valid = dht; // powrot do stanu DHT22_STATE_IDLE jest w TIM3_IRQHandler
|
dht_valid = dht; // powrot do stanu DHT22_STATE_IDLE jest w TIM3_IRQHandler
|
||||||
dht22State = DHT22_STATE_DONE;
|
dht22State = DHT22_STATE_DONE;
|
||||||
|
|
Ładowanie…
Reference in New Issue