Fixed initialisation of step ranges
Added "always update" flag to update server
This commit is contained in:
parent
c789fd259b
commit
98fd68eeee
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user