Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Fix zone checks #1

@JanSimek

Description

@JanSimek

Currently, we check only 128 zones for zone violation, so this works on Integra 128, but other models support varying number of zones... 32, 64, 128, so we need to check zone number based on the model type.

for ($i = 0; $i < 16; $i++) {
    for ($b = 0; $b < 8; $b++) {
        if (pow(2, $b) & hexdec(bin2hex($raw[$i+3]))) { // 0xFE 0xFE 0x00 ..
            $number = 8 * $i + $b + 1;
            // TODO: self::PARTITION, self::OUTPUT, etc.
            $violated[$number] = $this->sendCommand("EE" . self::ZONEX . sprintf("%02s", dechex($number)));
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions