8static const char *
const TAG =
"servo";
15 " Idle Level: %.1f%%\n"
16 " Min Level: %.1f%%\n"
17 " Max Level: %.1f%%\n"
18 " Auto-detach time: %" PRIu32
" ms\n"
19 " Run duration: %" PRIu32
" ms",
46 ESP_LOGD(TAG,
"Detached on auto_detach_time");
55 float percentage_run = current_runtime * 1.0f / target_runtime * 1.0f;
56 if (percentage_run > 1.0f) {
57 percentage_run = 1.0f;
68 ESP_LOGD(TAG,
"Reached target");
73 value = clamp(value, -1.0f, 1.0f);
83 ESP_LOGD(TAG,
"New target: %f", value);
87 value = clamp(value, -1.0f, 1.0f);
void set_level(float state)
Set the level of this float output, this is called from the front-end.
uint32_t transition_length_
uint32_t auto_detach_time_
void dump_config() override
output::FloatOutput * output_
void internal_write(float value)
void save_level_(float v)
ESPPreferences * global_preferences
uint32_t IRAM_ATTR HOT millis()
ESPPreferenceObject make_preference(size_t, uint32_t, bool)