+ -- avoid as many updates as possible by checking if there's changes first
+ if button.prev and
+ button.prev[1] == locstart and button.prev[2] == locduration and
+ button.prev[3] == start and button.prev[4] == duration and
+ button.prev[5] == enable and button.prev[6] == modrate and
+ button.prev[7] == charges and button.prev[8] == maxcharges and
+ button.prev[9] == chargestart and button.prev[10] == chargeduration and
+ button.prev[11] == chargemodrate then
+ return;
+ end
+ button.prev = { locstart, locduration, start, duration, enable, modrate,
+ charges, maxcharges, chargestart, chargeduration, chargemodrate };