diff --git a/src/stairs.cpp b/src/stairs.cpp index ae8349e..1a60ce8 100644 --- a/src/stairs.cpp +++ b/src/stairs.cpp @@ -18,7 +18,12 @@ struct Header void Stairs::init(PCA9685* pwmDriver) { this->useScaling = false; - memset(this->ranges, 0, sizeof(this->ranges)); + + for (uint8_t i = 0; i < StepCount; i++) + { + this->ranges[i].start = IStairs::Off; + this->ranges[i].end = IStairs::On; + } this->pwmDriver = pwmDriver; diff --git a/web/app.js b/web/app.js index 42f3029..b4e38b7 100644 --- a/web/app.js +++ b/web/app.js @@ -10,6 +10,7 @@ var stairsHost = '10.138.2.25'; var stairsUdpPort = 3126; var firmwareFile = './update/firmware.bin'; +var alwaysUpdate = true; function requireNoCache(filename) @@ -21,6 +22,8 @@ function requireNoCache(filename) function isNewer(version1, version2) { + if (alwaysUpdate) return true; + if (version1.major > version2.major) return true; if (version1.major < version2.major) return false;