- Modified main.c to initialize Dalls OneWire pins according to the configuration

- Updated config file for sr9nci
pull/2/head DE01
Mateusz Lubecki 2019-09-10 22:34:08 +02:00
rodzic 9c55d8820c
commit 9d7d6b5b50
2 zmienionych plików z 17 dodań i 7 usunięć

Wyświetl plik

@ -12,11 +12,13 @@
//#define _DBG_TRACE
// Uncomment to enable all meteo functionality. TX20 anemometer, dallas termometer, MS5611 pressure sens
//#define _METEO
#define _METEO
#define _DIGI // Comment this do disable WIDE1-1 digipeating
#define _DIGI_ONLY_789
//#define _DALLAS_AS_TELEM
//#define _DALLAS_SPLIT_PIN
//#define _VICTRON
//#define _MUTE_RF // TODO: Not yet implemented - This will make station RXonly and disable all data transmission
@ -51,16 +53,16 @@
#define _WIDE21_PATH // CALL-S>AKLPRZ,WIDE2-1:data
// Comment this to disable beacon auto sending during startup (this can be risky if RF feedback occur)
#define _BCN_ON_STARTUP
//#define _BCN_ON_STARTUP
#define _WX_INTERVAL 4 // WX packet interval in minutes
#define _WX_INTERVAL 3 // WX packet interval in minutes
#define _BCN_INTERVAL 15 // Own beacon interval in minutes
//#define _PTT_PUSHPULL // Uncomment this if you want PTT line to work as Push-pull instead of Open Drain
#define _SERIAL_BAUDRATE 9600
// Transmitting delay
#define _DELAY_BASE 19 // * 50ms. For example setting 10 gives 500msec delay. Maximum value is 20
#define _DELAY_BASE 20 // * 50ms. For example setting 10 gives 500msec delay. Maximum value is 20
//#define _RANDOM_DELAY // adds random delay TO fixed time set by _DELAY_BASE. This additional time can be
// from 100ms up to 1 sec in 100ms steps. Values are drawn from samples going from ADC
// so it is better to use Unsquelched output in radio to provide much more randomness

Wyświetl plik

@ -188,11 +188,19 @@ main(int argc, char* argv[])
#ifdef _METEO
dht22_init();
#ifndef _DALLAS_SPLIT_PIN
dallas_init(GPIOC, GPIO_Pin_6, GPIO_PinSource6);
#else
dallas_init(GPIOC, GPIO_Pin_11, GPIO_PinSource11);
#endif
TX20Init();
#endif
#ifdef _DALLAS_AS_TELEM
dallas_init(GPIOC, GPIO_Pin_11, GPIO_PinSource11); // B5 output, B6 input
#ifndef _DALLAS_SPLIT_PIN
dallas_init(GPIOC, GPIO_Pin_6, GPIO_PinSource6);
#else
dallas_init(GPIOC, GPIO_Pin_11, GPIO_PinSource11);
#endif
#endif
// initializing UART drvier