added options argument 'index'

This commit is contained in:
Daniel Sommer 2022-02-21 01:14:42 +01:00
parent 1d715995ff
commit adc9f59adc

View file

@ -113,7 +113,12 @@ function parseRequest(data) {
}
};
if (data.index != undefined) {
blinkstickConfig.options.index = data.index;
blinkstickConfig.options.index = parseInt(data.index);
if (blinkstickConfig.options.index < 0) {
blinkstickConfig.options.index = 0;
} else if (blinkstickConfig.options.index > 7) {
blinkstickConfig.options.index = 7;
}
}
if (blinkstickConfig.options.duration < 100) {
blinkstickConfig.options.duration = 100;