Fix status bit offset

This commit is contained in:
Nicolas Le Goff
2014-10-29 16:55:33 +01:00
parent 7706d7ca10
commit 3f26c2161d

View File

@@ -1515,7 +1515,7 @@ class API_V1_adapter extends API_V1_Abstract
$status = strrev($status);
$ret = array();
foreach ($databox->get_statusbits() as $bit => $status_datas) {
$ret[] = array('bit' => $bit, 'state' => !!substr($status, ($bit - 1), 1));
$ret[] = array('bit' => $bit, 'state' => !!substr($status, $bit, 1));
}
return $ret;