- Timestamp:
- Apr 7, 2020, 11:43:11 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Measure/Measure.php
r89 r91 105 105 if($this->Data['Continuity'] == 0) $this->Data['ContinuityEnabled'] = 0; // non continuous 106 106 else $this->Data['ContinuityEnabled'] = 2; // continuous graph 107 } else die('Měřená veličina nenalezena');107 } else die('Měřená veličina '.$Id.' nenalezena.'); 108 108 } 109 109 … … 235 235 if($ValueType == 'Avg') 236 236 { 237 if($Values[$I + 1]['Continuity'] == $this->Data['ContinuityEnabled']); 237 if ($this->Data['Cumulative']) 238 { 239 $NewValue[$ValueType] = $NewValue[$ValueType] + $Values[$I][$ValueType]; 240 } else 241 { 242 if($Values[$I + 1]['Continuity'] == $this->Data['ContinuityEnabled']); 238 243 else if($this->Differential == 0) 239 244 { 240 245 $NewValue[$ValueType] = $NewValue[$ValueType] + ($Values[$I + 1]['Time'] - $Values[$I]['Time']) * 241 246 (($Values[$I + 1][$ValueType] - $Values[$I][$ValueType]) / 2 + $Values[$I][$ValueType]); 242 247 } else { 243 248 $NewValue[$ValueType] = $NewValue[$ValueType] + ($Values[$I + 1]['Time'] - $Values[$I]['Time']) * 244 249 (($Values[$I + 1][$ValueType] - $Values[$I][$ValueType]) / 2); 245 250 } 251 } 246 252 } 247 253 else if($ValueType == 'Max') … … 445 451 $EndTime = $this->AlignTime($TimeRange['Right'], $TimeSegment); 446 452 $BurstCount = 500; 447 echo('For 0 to '.round(($EndTime - $StartTime) / $TimeSegment / $BurstCount)."<br>\n"); 448 for($I = 0; $I <= round(($EndTime - $StartTime) / $TimeSegment / $BurstCount); $I++) 453 $Count = round(($EndTime - $StartTime) / $TimeSegment / $BurstCount); 454 echo('For 0 to '.$Count."<br>\n"); 455 for($I = 0; $I <= $Count; $I++) 449 456 { 450 457 echo($I.' ');
Note:
See TracChangeset
for help on using the changeset viewer.