summaryrefslogtreecommitdiffstats
path: root/server/building.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-11-26 15:08:44 -0500
committerSam Anthony <sam@samanthony.xyz>2024-11-26 15:08:44 -0500
commitd40dee9b7b5327b30e6bcf770dfda14a2e6fed02 (patch)
tree039f57306b5bb716a0c282126e29380727933f1f /server/building.go
parent5f24b031fa0b10e1cf8fbc7345daa223908e1872 (diff)
downloadsoen422-d40dee9b7b5327b30e6bcf770dfda14a2e6fed02.zip
server: limit number of samples kept in memory
Diffstat (limited to 'server/building.go')
-rw-r--r--server/building.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/building.go b/server/building.go
index c7d298f..8772374 100644
--- a/server/building.go
+++ b/server/building.go
@@ -7,7 +7,7 @@ type Building map[RoomID]Record[Humidity]
func newBuilding(roomIDs []RoomID) Building {
b := make(Building)
for _, id := range roomIDs {
- b[id] = newRecord[Humidity]()
+ b[id] = newRecord[Humidity](historySize)
}
return b
}