mirror of
https://github.com/esphome/esphome.git
synced 2025-03-13 22:28:14 +00:00
Update mcp4461_output.h
This commit is contained in:
parent
486f134181
commit
adf662e16c
@ -11,15 +11,28 @@ namespace mcp4461 {
|
||||
class Mcp4461Wiper : public output::FloatOutput, public Parented<Mcp4461Component> {
|
||||
public:
|
||||
Mcp4461Wiper(Mcp4461Component *parent, Mcp4461WiperIdx wiper) : parent_(parent), wiper_(wiper) {}
|
||||
|
||||
void turn_on() override;
|
||||
void turn_off() override;
|
||||
/// @brief Enables/Disables current output using bool parameter
|
||||
/// @param[in] state boolean var representing desired state (true=ON, false=OFF)
|
||||
void set_state(bool state) override;
|
||||
/// @brief Enables current output
|
||||
void turn_on() override;
|
||||
/// @brief Disables current output
|
||||
void turn_off() override;
|
||||
/// @brief Read current device wiper state without updating internal output state
|
||||
/// @return float - current device state as float in range 0 - 1.0
|
||||
float read_state();
|
||||
/// @brief Update current output state using device wiper state
|
||||
/// @return float - current updated output state as float in range 0 - 1.0
|
||||
float update_state();
|
||||
/// @brief Increase wiper by 1 tap
|
||||
void increase_wiper();
|
||||
/// @brief Decrease wiper by 1 tap
|
||||
void decrease_wiper();
|
||||
/// @brief Enable given terminal
|
||||
/// @param[in] terminal single char parameter defining desired terminal to enable, one of { 'a', 'b', 'w', 'h' }
|
||||
void enable_terminal(char terminal);
|
||||
/// @brief Disable given terminal
|
||||
/// @param[in] terminal single char parameter defining desired terminal to disable, one of { 'a', 'b', 'w', 'h' }
|
||||
void disable_terminal(char terminal);
|
||||
|
||||
protected:
|
||||
@ -27,7 +40,6 @@ class Mcp4461Wiper : public output::FloatOutput, public Parented<Mcp4461Componen
|
||||
Mcp4461Component *parent_;
|
||||
Mcp4461WiperIdx wiper_;
|
||||
float state_;
|
||||
optional<uint16_t> initial_value_;
|
||||
};
|
||||
|
||||
} // namespace mcp4461
|
||||
|
Loading…
x
Reference in New Issue
Block a user