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
}
# Calculate trend more efficiently
$trend = "" # Default to neutral
# Calculate trend more efficiently - FIXED: Using ASCII characters instead of Unicode
$trend = "-" # Default to neutral (horizontal line)
if ($stats[$addr].SampleCount -ge 5) {
$samples = $stats[$addr].SampleArray
$count = $stats[$addr].SampleCount
@@ -354,11 +354,11 @@ try {
$slope = $last - $first
if ([Math]::Abs($slope) -lt 5) {
$trend = ""
$trend = "-" # Neutral
} elseif ($slope -lt 0) {
$trend = ""
$trend = "v" # Down arrow
} else {
$trend = ""
$trend = "^" # Up arrow
}
}