Skip to content

Commit

Permalink
ステータスの更新頻度を調整
Browse files Browse the repository at this point in the history
  • Loading branch information
CoreNion committed Dec 19, 2023
1 parent f42260b commit 07cfc8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/status.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ async function refleshStatus() {
// クライアントサイドのみで実行
onMounted(async () => {
// 2秒ごとに温度を更新 (1秒だとシリアル通信が追いつかない?
// 10秒ごとに温度を更新 (1秒だとシリアル通信が追いつかない?
await refleshStatus();
sensorInterval = useIntervalFn(refleshStatus, 2000);
sensorInterval = useIntervalFn(refleshStatus, 10000);
// 10分ごとに天気を更新
await refleshWeather();
useIntervalFn(refleshWeather, 10000);
useIntervalFn(refleshWeather, 600000);
});
</script>

Expand Down

0 comments on commit 07cfc8d

Please sign in to comment.