From 7b07b2bec677a84e2a2415d871a0ff4904ab165a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Thu, 18 Jan 2018 22:29:00 +0100 Subject: [PATCH] Reduce buffer size of EspSoftwareSerial instances --- code/espurna/sensors/MHZ19Sensor.h | 2 +- code/espurna/sensors/PMSX003Sensor.h | 2 +- code/espurna/sensors/V9261FSensor.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/espurna/sensors/MHZ19Sensor.h b/code/espurna/sensors/MHZ19Sensor.h index 1c039e6a..201625cb 100644 --- a/code/espurna/sensors/MHZ19Sensor.h +++ b/code/espurna/sensors/MHZ19Sensor.h @@ -76,7 +76,7 @@ class MHZ19Sensor : public BaseSensor { if (_serial) delete _serial; - _serial = new SoftwareSerial(_pin_rx, _pin_tx, false, 256); + _serial = new SoftwareSerial(_pin_rx, _pin_tx, false, 32); _serial->begin(9600); calibrateAuto(false); diff --git a/code/espurna/sensors/PMSX003Sensor.h b/code/espurna/sensors/PMSX003Sensor.h index 25cd233d..6a08157e 100644 --- a/code/espurna/sensors/PMSX003Sensor.h +++ b/code/espurna/sensors/PMSX003Sensor.h @@ -67,7 +67,7 @@ class PMSX003Sensor : public BaseSensor { if (_serial) delete _serial; if (_pms) delete _pms; - _serial = new SoftwareSerial(_pin_rx, _pin_tx, false, 256); + _serial = new SoftwareSerial(_pin_rx, _pin_tx, false, 32); _serial->begin(9600); _pms = new PMS(* _serial); _pms->passiveMode(); diff --git a/code/espurna/sensors/V9261FSensor.h b/code/espurna/sensors/V9261FSensor.h index 7d244fba..6d846d58 100644 --- a/code/espurna/sensors/V9261FSensor.h +++ b/code/espurna/sensors/V9261FSensor.h @@ -65,7 +65,7 @@ class V9261FSensor : public BaseSensor { if (_serial) delete _serial; - _serial = new SoftwareSerial(_pin_rx, SW_SERIAL_UNUSED_PIN, _inverted, 256); + _serial = new SoftwareSerial(_pin_rx, SW_SERIAL_UNUSED_PIN, _inverted, 32); _serial->begin(V9261F_BAUDRATE); }