Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP Tx En GPIO type #21269

Merged
merged 1 commit into from
Apr 24, 2024
Merged

TCP Tx En GPIO type #21269

merged 1 commit into from
Apr 24, 2024

Conversation

s-hadinger
Copy link
Collaborator

Description:

Support for native RS485 for TCP-Serial-Bridge:

  • add TCP Tx En GPIO type, configure TCP Serial accordingly
  • add clearTransmitEnablePin() to remove EN pin from TasmotaSeial
  • update GPIO type in Berry
  • add serial. config_tx_en(gpio:int) -> nil. Configure physical GPIO number, or -1 to clear EN Ping

Related issue (if applicable): fixes #21238

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.6
  • The code change is tested and works with Tasmota core ESP32 V.3.0.0
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@s-hadinger s-hadinger merged commit 91dd120 into arendst:development Apr 24, 2024
59 checks passed
hawa-lc4 pushed a commit to hawa-lc4/Tasmota-dev that referenced this pull request May 7, 2024
@nikito7
Copy link

nikito7 commented Jun 2, 2024

Do not support gpio16 🤔

bool TasmotaSerial::isValidGPIOpin(int pin) {
#ifdef ESP8266
  return (pin >= -1 && pin <= 5) || (pin >= 12 && pin <= 15);
#endif
#ifdef ESP32
  return GPIO_IS_VALID_OUTPUT_GPIO(pin);
#endif
}

@arendst
Copy link
Owner

arendst commented Jun 2, 2024

Will fix into

void TasmotaSerial::setTransmitEnablePin(int tx_enable_pin) {
#ifdef ESP8266
  if ((tx_enable_pin > -1) && (isValidGPIOpin(tx_enable_pin) || (16 == tx_enable_pin))) {
#endif
#ifdef ESP32
  if ((tx_enable_pin > -1) && isValidGPIOpin(tx_enable_pin)) {
#endif
    m_tx_enable_pin = tx_enable_pin;
    pinMode(m_tx_enable_pin, OUTPUT);
    digitalWrite(m_tx_enable_pin, LOW);
  }
}

arendst added a commit that referenced this pull request Jun 2, 2024
Jason2866 added a commit to Jason2866/Tasmota that referenced this pull request Jun 5, 2024
* Berry coc parser keeps order of variables (arendst#21542)

* Bugfix: crash when using tjpegd and LVGL (arendst#21544)

* prevent crashes when using tjpegd in other places in Tasmota

* do not use external tjpegd in Tasmota

* Update changelogs

* SML: Allow larger offset when using x to ignore bytes (arendst#21535)

* Allow larger offset when using x to ignore bytes

STW Klagenfurt sends 355 bytes, and the interesting values starts somewhere at position 304. Therefor we need to set a larger uint range to allow more than 255 bytes to ignore.

* Update xsns_53_sml.ino

---------

Co-authored-by: Theo Arends <11044339+arendst@users.noreply.github.com>

* Change GPIOViewer from v1.5.3 to v1.5.4 (No functional change)

* Fix GPIO16 as Transmit enable pin (arendst#21269)

* Support Levoit Core200s (WIP, Feedback requested) (arendst#21502)

* Support Levoit Core 200S

Add berry script to support Levoit Core 200S (and possibly other too
since levoit offers multiple similar devices)

* Core200S: fix comments

* forgotten safety check (arendst#21549)

* Bump v14.1.0.1

* Berry bytes solidification (arendst#21558)

* Berry prepare for bytes() solidification

* Berry solidification of bytes objects

* Berry solidification of `bytes` instances

* Matter support for Air Quality sensors (arendst#21559)

* Add default value for `SetOption151` (arendst#21560)

* Update changelogs

* Remove GPIO_I2S_BCLK_IN,  GPIO_I2S_WS_IN

* add uTouch settings

* uTouch for m5core2

* Berry `input()` returns empty string and does not crash (arendst#21565)

---------

Co-authored-by: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Co-authored-by: Christian Baars <baars@klinikum-brandenburg.de>
Co-authored-by: Theo Arends <11044339+arendst@users.noreply.github.com>
Co-authored-by: Andreas Doppelhofer <andreas.doppelhofer@gmx.at>
Co-authored-by: blenk92 <30472652+blenk92@users.noreply.github.com>
Co-authored-by: Christian Baars <Baars@gmx.de>
Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants