Merge pull request #356 from cyberman54/development

Development
This commit is contained in:
Verkehrsrot 2019-04-20 12:44:29 +02:00 committed by GitHub
commit 49abe7242c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 28 deletions

View File

@ -25,8 +25,8 @@
//#define HAS_BUTTON (0) // on board button -> don't use, is same as RTC_INT!
// Pins for I2C interface of OLED Display
#define MY_OLED_SDA (21)
#define MY_OLED_SCL (22)
#define MY_OLED_SDA SDA
#define MY_OLED_SCL SCL
#define MY_OLED_RST U8X8_PIN_NONE
// Settings for on board DS3231 RTC chip
@ -36,17 +36,17 @@
#define RTC_INT GPIO_NUM_0 //
// Settings for IF482 interface
//#define HAS_IF482 9600, SERIAL_7E1, GPIO_NUM_3, GPIO_NUM_1 // RX, TX
#define HAS_IF482 9600, SERIAL_7E1, GPIO_NUM_3, GPIO_NUM_1 // RX, TX
// Settings for DCF77 interface
//#define HAS_DCF77 GPIO_NUM_14 // JP8 #13
//#define DCF77_ACTIVE_LOW 1
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK (18)
#define LORA_CS (5)
#define LORA_MISO (19)
#define LORA_MOSI (23)
#define LORA_SCK SCK
#define LORA_CS SS
#define LORA_MISO MISO
#define LORA_MOSI MOSI
#define LORA_RST (17)
#define LORA_IRQ (16)
#define LORA_IO1 (14) // JP8 #13 to be external wired

View File

@ -20,13 +20,19 @@
#define HAS_BUTTON KEY_BUILTIN // button "PROG" on board
// Pins for I2C interface of OLED Display
#define MY_OLED_SDA (4)
#define MY_OLED_SCL (15)
#define MY_OLED_RST (16)
#define MY_OLED_SDA SDA_OLED
#define MY_OLED_SCL SCL_OLED
#define MY_OLED_RST RST_OLED
// Pins for LORA chip SPI interface come from board file, we need some
// additional definitions for LMIC
#define LORA_IO1 (33)
#define LORA_IO2 (32)
#define LORA_IRQ DIO0
#define LORA_IO1 DIO1
#define LORA_IO2 DIO2
#define LORA_SCK SCK
#define LORA_MISO MISO
#define LORA_MOSI MOSI
#define LORA_RST RST_LoRa
#define LORA_CS SS
#endif

View File

@ -20,18 +20,24 @@
//#define BAT_MEASURE_ADC ADC2_GPIO13_CHANNEL // battery probe GPIO pin
//#define BAT_VOLTAGE_DIVIDER 4 // voltage divider 220k/100k on board
//#define EXT_POWER_SW GPIO_NUM_21 // switches battery power, Vext control 0 = on / 1 = off
//#define EXT_POWER_ON 0
#define EXT_POWER_SW Vext // switches battery power, Vext control 0 = on / 1 = off
#define EXT_POWER_ON 0
//#define EXT_POWER_OFF 1
// Pins for I2C interface of OLED Display
#define MY_OLED_SDA (4)
#define MY_OLED_SCL (15)
#define MY_OLED_RST (16)
#define MY_OLED_SDA SDA_OLED
#define MY_OLED_SCL SCL_OLED
#define MY_OLED_RST RST_OLED
// Pins for LORA chip SPI interface come from board file, we need some
// additional definitions for LMIC
#define LORA_IO1 (35)
#define LORA_IO2 (34)
#define LORA_IRQ DIO0
#define LORA_IO1 DIO1
#define LORA_IO2 DIO2
#define LORA_SCK SCK
#define LORA_MISO MISO
#define LORA_MOSI MOSI
#define LORA_RST RST_LoRa
#define LORA_CS SS
#endif

View File

@ -35,10 +35,10 @@
//#define DCF77_ACTIVE_LOW 1
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK (5)
#define LORA_CS (18)
#define LORA_MISO (19)
#define LORA_MOSI (27)
#define LORA_SCK SCK
#define LORA_CS SS
#define LORA_MISO MISO
#define LORA_MOSI MOSI
#define LORA_RST (23)
#define LORA_IRQ (26)
#define LORA_IO1 (33)

View File

@ -216,11 +216,7 @@ int recv_timesync_ans(uint8_t seq_no, uint8_t buf[], uint8_t buf_len) {
// adjust system time, calibrate RTC and RTC_INT pps
void IRAM_ATTR setMyTime(uint32_t t_sec, uint16_t t_msec) {
time_t time_to_set = (time_t)t_sec;
//#if (!defined GPS_INT && !defined RTC_INT)
// time_to_set++;
//#endif
time_t time_to_set = (time_t)(t_sec + 1);
ESP_LOGD(TAG, "[%0.3f] Calculated UTC epoch time: %d.%03d sec",
millis() / 1000.0, time_to_set, t_msec);