| 151 | */ |
| 152 | template <class TSwitchQuantity = SwitchQuantity> |
| 153 | TSwitchQuantity* configSwitch(int paramId, float minValue, float maxValue, float defaultValue, std::string name = "", std::vector<std::string> labels = {}) { |
| 154 | TSwitchQuantity* sq = configParam<TSwitchQuantity>(paramId, minValue, maxValue, defaultValue, name); |
| 155 | sq->ParamQuantity::snapEnabled = true; |
| 156 | sq->ParamQuantity::smoothEnabled = false; |
| 157 | sq->SwitchQuantity::labels = labels; |
| 158 | return sq; |
| 159 | } |
| 160 | |
| 161 | /** Helper for creating a SwitchQuantity with no label. |
| 162 | Should only be called from a Module subclass's constructor. |
nothing calls this directly
no outgoing calls
no test coverage detected