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

Use uint8_t instead of uint32_t for 8-bit values on mitsubishi #6824

Merged
merged 1 commit into from
May 28, 2024

Conversation

DAVe3283
Copy link
Contributor

What does this implement/fix?

The mitsubishi component was using a uint32_t array to build & process 8-bit messages.
This was causing some printf formatting issues on ESP-IDF, and wastes RAM on all platforms.

This PR switches to using uint8_t instead, solving both issues.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

# Example config.yaml
esphome:
  name: esp32c6test1
  friendly_name: esp32c6test1

esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  framework:
    type: esp-idf
    version: 5.2.1 # Need at least 5.1 for ESP32-C6
    platform_version: 6.7.0 # Need at least 6.4 for ESP32-C6
    sdkconfig_options:
      CONFIG_ESPTOOLPY_FLASHSIZE_4MB: y # default is 4MB but https://github.com/esphome/issues/issues/5404

logger:
  level: VERY_VERBOSE

api:
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
captive_portal:


climate:
  - platform: mitsubishi
    name: Mitsubishi
    supports_dry: "true"
    supports_fan_only: "true"
    horizontal_default: "left"
    vertical_default: "down"

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

This solves some printf formatting issues on ESP-IDF and saves RAM on all platforms.
@probot-esphome
Copy link

Hey there @RubyBailey, mind taking a look at this pull request as it has been labeled with an integration (mitsubishi) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

Copy link
Member

@kbx81 kbx81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks! 🍻

@kbx81 kbx81 enabled auto-merge (squash) May 28, 2024 20:42
@kbx81 kbx81 merged commit 06996de into esphome:dev May 28, 2024
57 checks passed
@RubyBailey
Copy link
Contributor

Thank you. That’s great. 🍻🍻

@github-actions github-actions bot locked and limited conversation to collaborators May 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants