mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
Merge branch 'bench-number-select-switch' into select-switch-logv-downgrade
This commit is contained in:
@@ -7,7 +7,7 @@ namespace esphome::benchmarks {
|
||||
// Inner iteration count to amortize CodSpeed instrumentation overhead.
|
||||
static constexpr int kInnerIterations = 2000;
|
||||
|
||||
// Minimal Number for benchmarking — control() is a no-op.
|
||||
// Minimal Number for benchmarking — control() publishes the value back.
|
||||
class BenchNumber : public number::Number {
|
||||
public:
|
||||
void configure(const char *name) { this->configure_entity_(name, 0x12345678, 0); }
|
||||
|
||||
@@ -16,11 +16,6 @@ class BenchSelect : public select::Select {
|
||||
void control(size_t index) override { this->publish_state(index); }
|
||||
};
|
||||
|
||||
// Option lists matching real Apollo R-PRO-1 usage patterns.
|
||||
static constexpr const char *kSmallOptions[] = {"off", "on", "auto"};
|
||||
static constexpr const char *kLargeOptions[] = {"off", "still", "move", "still+move", "custom1",
|
||||
"custom2", "custom3", "custom4", "custom5", "custom6"};
|
||||
|
||||
// Helper to create a select with the given options.
|
||||
static void setup_select(BenchSelect &select, const char *name, std::initializer_list<const char *> options) {
|
||||
select.configure(name);
|
||||
|
||||
Reference in New Issue
Block a user