35 const float temp = ((
even[12] & 0x04) ? 31.5f : 31.0f) -
static_cast<float>(
even[7]);
53 static constexpr uint8_t
PWR_ON = 0x24;
BedjetMode mode
BedJet operating mode.
static constexpr uint8_t MODE_HEAT
static constexpr uint8_t MODE_AUTO
static optional< ClimateMode > get_mode(const PDPioneerData &even)
Empty for a mode byte this remote does not use.
static constexpr uint8_t MODE_DRY
static float get_temp(const PDPioneerData &even)
Clamped to the set point range, so a frame from a sibling remote cannot publish an impossible value.
void set_swing_mode(climate::ClimateSwingMode mode)
static bool get_horizontal_swing(const PDPioneerData &odd)
Only the odd burst carries horizontal swing; the even burst carries vertical swing.
static ClimateFanMode get_fan_mode(const PDPioneerData &even)
static constexpr uint8_t SWING_VERTICAL_EVEN_MASK
Vertical swing also sets this mask on even frame position 8 (fan sub-code).
void finalize()
Write the fan and swing positions, which share bytes, then the checksums.
void set_eco(bool enabled)
void set_mode(ClimateMode mode)
static constexpr uint8_t MODE_FAN_ONLY
static constexpr uint8_t MODE_COOL
uint8_t swing_
Odd-burst position 7: SWING_VERTICAL and SWING_HORIZONTAL flags.
static constexpr uint8_t SWING_VERTICAL
static constexpr uint8_t PWR_OFF
const PDPioneerData & even() const
static constexpr uint8_t PWR_ON
void set_temp(float temp_c)
static bool get_eco(const PDPioneerData &even)
static constexpr uint8_t PWR_ECO
static climate::ClimateSwingMode get_swing_mode(const PDPioneerData &even, bool horizontal)
const PDPioneerData & odd() const
static constexpr uint8_t SWING_HORIZONTAL
void set_fan_mode(ClimateFanMode mode)
ClimateSwingMode
Enum for all modes a climate swing can be in NOTE: If adding values, update ClimateSwingModeMask in c...
ClimateMode
Enum for all modes a climate device can be in.
ClimateFanMode
NOTE: If adding values, update ClimateFanModeMask in climate_traits.h to use the new last value.
@ CLIMATE_FAN_HIGH
The fan mode is set to High.
constexpr uint8_t PDPIONEER_TEMPC_MAX
constexpr uint8_t PDPIONEER_TEMPC_MIN