Browse Source

cfg: more warnings about uart changes

pull/2552/head
Maxim Prokhorov 1 year ago
parent
commit
b52b128f5e
2 changed files with 58 additions and 12 deletions
  1. +46
    -0
      code/espurna/config/deprecated.h
  2. +12
    -12
      code/espurna/config/sensors.h

+ 46
- 0
code/espurna/config/deprecated.h View File

@ -171,7 +171,53 @@
#warning "API_REAL_TIME_VALUES is deprecated! Please use SENSOR_REAL_TIME_VALUES"
#endif
#ifdef DEBUG_PORT
#warning "DEBUG_PORT is deprecated! Please set up the appropriate port as DEBUG_SERIAL_PORT=[1-3]"
#endif
#ifdef SERIAL_BAUDRATE
#warning "SERIAL_BAUDRATE is deprecated! Please use UART[1-3]_BAUDRATE"
#define UART1_BAUDRATE SERIAL_BAUDRATE
#endif
#if ( defined(PZEM004TV30_HW_PORT) || \
defined(PZEM004TV30_USE_SOFT) || \
defined(PZEM004T_HW_PORT) || \
defined(PZEM004T_USE_SOFT) || \
defined(PMS_USE_SOFT) \
)
#warning "Software serial can be enabled with UART_SOFTWARE_SUPPORT"
#undef UART_SOFTWARE_SUPPORT
#define UART_SOFTWARE_SUPPORT 1
#endif
#if ( defined(CSE7766_RX_PIN) || \
defined(CSE7766_BAUDRATE) || \
defined(CSE7766_PIN_INVERSE) || \
defined(MHZ19_RX_PIN) || \
defined(MHZ19_TX_PIN) || \
defined(PM1006_RX_PIN) || \
defined(PM1006_BAUDRATE) || \
defined(PMS_RX_PIN) || \
defined(PMS_TX_PIN) || \
defined(PMS_HW_PORT) || \
defined(PZEM004T_RX_PIN) || \
defined(PZEM004T_TX_PIN) || \
defined(PZEM004TV30_RX_PIN) || \
defined(PZEM004TV30_TX_PIN) || \
defined(SDS011_RX_PIN) || \
defined(SDS011_TX_PIN) || \
defined(SENSEAIR_RX_PIN) || \
defined(SENSEAIR_TX_PIN) || \
defined(SM300D2_RX_PIN) || \
defined(SM300D2_TX_PIN) || \
defined(T6613_RX_PIN) || \
defined(T6613_TX_PIN) || \
defined(V9261F_PIN) || \
defined(V9261F_PIN_INVERSE) || \
defined(V9261F_BAUDRATE) || \
defined(EZOPH_RX_PIN) || \
defined(EZOPH_TX_PIN) \
)
#warning "Sensor serial port configuration should be using UART_... (see general.h) and UART[1-3]_... (see defaults.h)"
#endif

+ 12
- 12
code/espurna/config/sensors.h View File

@ -266,7 +266,7 @@
#ifndef CSE7766_PORT
#define CSE7766_PORT 1 // By default, use the first port
// (needs `UART#_BAUDRATE 4800`)
// (needs `UART[1-3]_BAUDRATE 4800`)
#endif
//------------------------------------------------------------------------------
@ -803,7 +803,7 @@
#ifndef MHZ19_PORT
#define MHZ19_PORT 1 // By default, use the first port
// (needs `UART#_BAUDRATE 9600`)
// (needs `UART[1-3]_BAUDRATE 9600`)
#endif
//------------------------------------------------------------------------------
@ -901,7 +901,7 @@
#ifndef PM1006_PORT
#define PM1006_PORT 1 // By default, use the first port
// (needs `UART#_BAUDRATE 9600`)
// (needs `UART[1-3]_BAUDRATE 9600`)
#endif
//------------------------------------------------------------------------------
@ -915,7 +915,7 @@
#ifndef PMS_PORT
#define PMS_PORT 1 // By default, use the first port
// (needs `UART#_BAUDRATE 9600`)
// (needs `UART[1-3]_BAUDRATE 9600`)
#endif
#ifndef PMS_TYPE
@ -964,7 +964,7 @@
#ifndef PZEM004T_PORT
#define PZEM004T_PORT 1 // By default, use the first port
// (needs `UART#_BAUDRATE 9600`)
// (needs `UART[1-3]_BAUDRATE 9600`)
#endif
#ifndef PZEM004T_READ_INTERVAL
@ -1008,7 +1008,7 @@
#ifndef PZEM004TV30_PORT
#define PZEM004TV30_PORT 1 // By default, use the first port
// (needs `UART#_BAUDRATE 9600`)
// (needs `UART[1-3]_BAUDRATE 9600`)
#endif
#ifndef PZEM004TV30_DEBUG
@ -1026,7 +1026,7 @@
#ifndef SDS011_PORT
#define SDS011_PORT 1 // By default, use the first port
// (needs `UART#_BAUDRATE 9600`)
// (needs `UART[1-3]_BAUDRATE 9600`)
#endif
//------------------------------------------------------------------------------
@ -1040,7 +1040,7 @@
#ifndef SENSEAIR_PORT
#define SENSEAIR_PORT 1 // By default, use the first port
// (needs `UART#_BAUDRATE 9600`)
// (needs `UART[1-3]_BAUDRATE 9600`)
#endif
//------------------------------------------------------------------------------
@ -1080,7 +1080,7 @@
#ifndef SM300D2_PORT
#define SM300D2_PORT 1 // By default, use the first port
// (needs `UART#_BAUDRATE 9600`)
// (needs `UART[1-3]_BAUDRATE 9600`)
#endif
//------------------------------------------------------------------------------
@ -1132,7 +1132,7 @@
#ifndef T6613_PORT
#define T6613_PORT 1 // By default, use the first port
// (needs `UART#_BAUDRATE 9600`)
// (needs `UART[1-3]_BAUDRATE 9600`)
#endif
//------------------------------------------------------------------------------
@ -1159,7 +1159,7 @@
#ifndef V9261F_PORT
#define V9261F_PORT 1 // By default, use the first port
// (needs `UART#_BAUDRATE 4800` and `UART#_INVERSE 1`)
// (needs `UART[1-3]_BAUDRATE 4800` and `UART[1-3]_INVERSE 1`)
#endif
#ifndef V9261F_SYNC_INTERVAL
@ -1254,7 +1254,7 @@
#ifndef EZOPH_PORT
#define EZOPH_PORT 1 // By default, use the first port
// (needs `UART#_BAUDRATE 9600`)
// (needs `UART[1-3]_BAUDRATE 9600`)
#endif
#ifndef EZOPH_SYNC_INTERVAL


Loading…
Cancel
Save