Merge branch 'development' of github.com:arendst/Tasmota into pr_tm1638

This commit is contained in:
Ajith Vasudevan 2021-02-27 22:41:50 +05:30
commit cd7a435696
4 changed files with 65 additions and 1 deletions

View File

@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
## [Unreleased] - Development
## [9.3.1.1]
### Added
- Allow MCP230xx pinmode from output to input (#11104)
- SML VBUS support (#11125)
- Command ``Sensor80 1 <0..7>`` to control MFRC522 RFID antenna gain from 18dB (0) to 48dB (7) (#11073)
### Changed
- TuyaMcu dimmer timeout (#11121)
### Fixed
- Refactor acceleration function for shutter stepper and servo (#11088)
- LM75AD detection on different addresses (#11096)
- Timer loop when console is scrolled up regression from v9.3.0 (#11108)
- Display exception when no file system is present (#11125)
- PN532 on ESP32 Serial flush both Tx and Rx buffers (#10910)
## [Released]

View File

@ -79,3 +79,17 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
[Complete list](BUILDS.md) of available feature and sensors.
## Changelog v9.3.1.1
### Added
- Allow MCP230xx pinmode from output to input [#11104](https://github.com/arendst/Tasmota/issues/11104)
- SML VBUS support [#11125](https://github.com/arendst/Tasmota/issues/11125)
- Command ``Sensor80 1 <0..7>`` to control MFRC522 RFID antenna gain from 18dB (0) to 48dB (7) [#11073](https://github.com/arendst/Tasmota/issues/11073)
### Changed
- TuyaMcu dimmer timeout [#11121](https://github.com/arendst/Tasmota/issues/11121)
### Fixed
- Refactor acceleration function for shutter stepper and servo [#11088](https://github.com/arendst/Tasmota/issues/11088)
- LM75AD detection on different addresses [#11096](https://github.com/arendst/Tasmota/issues/11096)
- Timer loop when console is scrolled up regression from v9.3.0 [#11108](https://github.com/arendst/Tasmota/issues/11108)
- Display exception when no file system is present [#11125](https://github.com/arendst/Tasmota/issues/11125)
- PN532 on ESP32 Serial flush both Tx and Rx buffers [#10910](https://github.com/arendst/Tasmota/issues/10910)

View File

@ -173,7 +173,8 @@ void TasmotaSerial::flush(void) {
Serial.flush();
#endif // ESP8266
#ifdef ESP32
TSerial->flush();
TSerial->flush(); // Flushes Tx only https://github.com/espressif/arduino-esp32/pull/4263
while (TSerial->available()) { TSerial->read(); }
#endif // ESP32
} else {
m_in_pos = m_out_pos = 0;

View File

@ -126,6 +126,36 @@ void RC522Show(void) {
}
#endif // USE_WEBSERVER
/*********************************************************************************************\
* Supported commands for Sensor80:
*
* Sensor80 1 - Show antenna gain
* Sensor80 1 <gain> - Set antenna gain 0..7 (default 4)
\*********************************************************************************************/
bool RC522Command(void) {
bool serviced = true;
char argument[XdrvMailbox.data_len];
for (uint32_t ca = 0; ca < XdrvMailbox.data_len; ca++) {
if ((' ' == XdrvMailbox.data[ca]) || ('=' == XdrvMailbox.data[ca])) { XdrvMailbox.data[ca] = ','; }
}
switch (XdrvMailbox.payload) {
case 1: // Antenna gain
uint8_t gain;
if (strchr(XdrvMailbox.data, ',') != nullptr) {
gain = strtol(ArgV(argument, 2), nullptr, 10) & 0x7;
Mfrc522->PCD_SetAntennaGain(gain << 4);
}
gain = Mfrc522->PCD_GetAntennaGain() >> 4; // 0..7
Response_P(PSTR("{\"Sensor80\":{\"Gain\":%d}}"), gain);
break;
}
return serviced;
}
/*********************************************************************************************\
* Interface
\*********************************************************************************************/
@ -145,6 +175,11 @@ bool Xsns80(uint8_t function) {
RC522ScanForTag();
}
break;
case FUNC_COMMAND_SENSOR:
if (XSNS_80 == XdrvMailbox.index) {
result = RC522Command();
}
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_SENSOR:
RC522Show();