New packets, general Improvement

This commit is contained in:
Shoghi Cervantes Pueyo
2012-10-21 23:58:16 +02:00
parent 9c4abf49f5
commit 5425dfa5dc
7 changed files with 28 additions and 72 deletions

View File

@ -36,7 +36,7 @@ class Packet{
$this->offset = 1;
$this->raw = $data;
$this->data = array();
if($pid !== false){
if($data === ""){
$this->addRaw(chr($pid));
}
$this->struct = $struct;
@ -61,6 +61,7 @@ class Packet{
switch($this->pid){
case 0x05:
case 0x84:
case 0x8c:
$this->addRaw($this->data[$field]);
break;
}
@ -140,6 +141,7 @@ class Packet{
switch($this->pid){
case 0x05:
case 0x84:
case 0x8c:
$this->data[] = $this->get(true);
break;
}