서울 목포 집 판정과 체류 제외 정리
This commit is contained in:
+19
@@ -355,7 +355,24 @@ $findmydeviceHome = [
|
||||
'latitude' => isset($findmydeviceHomeConfig['latitude']) ? (float)$findmydeviceHomeConfig['latitude'] : null,
|
||||
'longitude' => isset($findmydeviceHomeConfig['longitude']) ? (float)$findmydeviceHomeConfig['longitude'] : null,
|
||||
'radius_m' => max(1, (int)($findmydeviceHomeConfig['radius_m'] ?? 50)),
|
||||
'label' => '서울 집',
|
||||
];
|
||||
$findmydeviceHomes = [];
|
||||
foreach ((array)($config['findmydevice_quiet_zones'] ?? []) as $zone) {
|
||||
if (!is_array($zone) || !isset($zone['latitude'], $zone['longitude'])) {
|
||||
continue;
|
||||
}
|
||||
$findmydeviceHomes[] = [
|
||||
'name' => (string)($zone['name'] ?? ''),
|
||||
'label' => (string)($zone['label'] ?? $zone['name'] ?? '집'),
|
||||
'latitude' => (float)$zone['latitude'],
|
||||
'longitude' => (float)$zone['longitude'],
|
||||
'radius_m' => max(1, (int)($zone['radius_m'] ?? $findmydeviceHome['radius_m'])),
|
||||
];
|
||||
}
|
||||
if (!$findmydeviceHomes && isset($findmydeviceHome['latitude'], $findmydeviceHome['longitude'])) {
|
||||
$findmydeviceHomes[] = $findmydeviceHome;
|
||||
}
|
||||
|
||||
function isMeaningfulHaValue($state): bool
|
||||
{
|
||||
@@ -896,6 +913,7 @@ if (isset($_GET['hashonly']) && $_GET['hashonly'] == '1') {
|
||||
'highAccuracyMode' => $highAccuracyMode,
|
||||
'sensors' => $sensorSections,
|
||||
'home' => $findmydeviceHome,
|
||||
'homes' => $findmydeviceHomes,
|
||||
]);
|
||||
|
||||
echo json_encode(['hash' => hash('sha256', $raw)]);
|
||||
@@ -921,6 +939,7 @@ echo json_encode([
|
||||
'highAccuracyMode' => $highAccuracyMode,
|
||||
'sensors' => $sensorSections,
|
||||
'home' => $findmydeviceHome,
|
||||
'homes' => $findmydeviceHomes,
|
||||
'history' => $includeHistory ? $path : null,
|
||||
'historyRawCount' => $includeHistory ? $historyRawCount : null,
|
||||
'historyRenderCount' => $includeHistory ? count($path) : null,
|
||||
|
||||
Reference in New Issue
Block a user