More linting

This commit is contained in:
tetele 2024-08-02 12:16:56 +03:00
parent c9a098ba0f
commit d4707e97c8
2 changed files with 2 additions and 6 deletions

View file

@ -3,12 +3,11 @@ from esphome.automation import maybe_simple_id
import esphome.codegen as cg import esphome.codegen as cg
import esphome.config_validation as cv import esphome.config_validation as cv
from esphome.components import i2c from esphome.components import i2c
from esphome.const import CONF_ID from esphome.const import CONF_ID, CONF_PRESET
from esphome.util import Registry from esphome.util import Registry
CONF_ES8388_ID = "es8388_id" CONF_ES8388_ID = "es8388_id"
CONF_PRESET = "preset"
CONF_INIT_INSTRUCTIONS = "init_instructions" CONF_INIT_INSTRUCTIONS = "init_instructions"
CONF_MACROS = "macros" CONF_MACROS = "macros"
CONF_INSTRUCTIONS = "instructions" CONF_INSTRUCTIONS = "instructions"

View file

@ -9,9 +9,6 @@ namespace es8388 {
static const char *const TAG = "es8388"; static const char *const TAG = "es8388";
#define ES8388_CLK_MODE_SLAVE 0
#define ES8388_CLK_MODE_MASTER 1
void ES8388Component::setup() { void ES8388Component::setup() {
switch (this->preset_) { switch (this->preset_) {
case ES8388Preset::RASPIAUDIO_MUSE_LUXE: case ES8388Preset::RASPIAUDIO_MUSE_LUXE:
@ -132,7 +129,7 @@ void ES8388Component::setup_raspiaudio_radio() {
error = error || not this->write_byte(1, 0x50); error = error || not this->write_byte(1, 0x50);
// powerup // powerup
error = error || not this->write_byte(2, 0x00); error = error || not this->write_byte(2, 0x00);
// slave mode // follower mode
error = error || not this->write_byte(8, 0x00); error = error || not this->write_byte(8, 0x00);
// DAC powerdown // DAC powerdown
error = error || not this->write_byte(4, 0xC0); error = error || not this->write_byte(4, 0xC0);