Replaced special characters with ASCII

This commit is contained in:
JBg
2025-03-20 09:15:54 +01:00
parent 268f1c5590
commit 78230b55fc

View File

@@ -337,8 +337,8 @@ try {
Write-PingDataLog -Address $addr -Status $status -ResponseTime $responseTime -SuccessRate $successRate Write-PingDataLog -Address $addr -Status $status -ResponseTime $responseTime -SuccessRate $successRate
} }
# Calculate trend more efficiently # Calculate trend more efficiently - FIXED: Using ASCII characters instead of Unicode
$trend = "" # Default to neutral $trend = "-" # Default to neutral (horizontal line)
if ($stats[$addr].SampleCount -ge 5) { if ($stats[$addr].SampleCount -ge 5) {
$samples = $stats[$addr].SampleArray $samples = $stats[$addr].SampleArray
$count = $stats[$addr].SampleCount $count = $stats[$addr].SampleCount
@@ -354,11 +354,11 @@ try {
$slope = $last - $first $slope = $last - $first
if ([Math]::Abs($slope) -lt 5) { if ([Math]::Abs($slope) -lt 5) {
$trend = "" $trend = "-" # Neutral
} elseif ($slope -lt 0) { } elseif ($slope -lt 0) {
$trend = "" $trend = "v" # Down arrow
} else { } else {
$trend = "" $trend = "^" # Up arrow
} }
} }