| 263 | } |
| 264 | |
| 265 | void updateLEDRing(const ProcessArgs& args) { |
| 266 | int activeLed; |
| 267 | if (burstEngine.active) { |
| 268 | activeLed = (burstEngine.triggersOccurred - 1) % 16; |
| 269 | } |
| 270 | else { |
| 271 | activeLed = (((int) params[QUANTITY_PARAM].getValue() - 1) % 16); |
| 272 | } |
| 273 | for (int i = 0; i < 16; ++i) { |
| 274 | lights[QUANTITY_LIGHTS + i].setBrightnessSmooth(i == activeLed, args.sampleTime * ledUpdateRate); |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | json_t* dataToJson() override { |
| 279 | json_t* rootJ = json_object(); |