Browse Source

sns: fix SoftwareSerial ctor for recent versions

mcspr-patch-1
Maxim Prokhorov 4 years ago
committed by Max Prokhorov
parent
commit
a6af8140b1
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      code/espurna/sensors/MHZ19Sensor.h
  2. +1
    -1
      code/espurna/sensors/PMSX003Sensor.h
  3. +1
    -1
      code/espurna/sensors/SenseAirSensor.h

+ 1
- 1
code/espurna/sensors/MHZ19Sensor.h View File

@ -76,7 +76,7 @@ class MHZ19Sensor : public BaseSensor {
if (_serial) delete _serial; if (_serial) delete _serial;
_serial = new SoftwareSerial(_pin_rx, _pin_tx, false, 32);
_serial = new SoftwareSerial(_pin_rx, _pin_tx, false);
_serial->enableIntTx(false); _serial->enableIntTx(false);
_serial->begin(9600); _serial->begin(9600);
calibrateAuto(_calibrateAuto); calibrateAuto(_calibrateAuto);


+ 1
- 1
code/espurna/sensors/PMSX003Sensor.h View File

@ -217,7 +217,7 @@ class PMSX003Sensor : public BaseSensor, PMSX003 {
if (_soft) { if (_soft) {
if (_serial) removeSerial(); if (_serial) removeSerial();
_serial = new SoftwareSerial(_pin_rx, _pin_tx, false, 64);
_serial = new SoftwareSerial(_pin_rx, _pin_tx, false);
static_cast<SoftwareSerial*>(_serial)->enableIntTx(false); static_cast<SoftwareSerial*>(_serial)->enableIntTx(false);
} }


+ 1
- 1
code/espurna/sensors/SenseAirSensor.h View File

@ -162,7 +162,7 @@ class SenseAirSensor : public BaseSensor, SenseAir {
if (_serial) delete _serial; if (_serial) delete _serial;
_serial = new SoftwareSerial(_pin_rx, _pin_tx, false, 64);
_serial = new SoftwareSerial(_pin_rx, _pin_tx, false);
_serial->enableIntTx(false); _serial->enableIntTx(false);
_serial->begin(9600); _serial->begin(9600);
_serial->enableRx(true); _serial->enableRx(true);


Loading…
Cancel
Save