fix: rename shadowed color variable to clr in notify/service.go
The local variable `color` shadowed the `image/color` package import, causing compilation failures on lines that referenced `color.RGBA` after the variable was declared. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c208a7d222
commit
622f8eaa49
1 changed files with 4 additions and 4 deletions
|
|
@ -649,18 +649,18 @@ func (s *Service) GenerateFloorPlanThumbnail(width, height int, blobs []struct {
|
|||
}
|
||||
|
||||
// Color based on state
|
||||
color := color.RGBA{100, 181, 246, 255} // Blue - normal
|
||||
clr := color.RGBA{100, 181, 246, 255} // Blue - normal
|
||||
if blob.IsFall {
|
||||
color = color.RGBA{239, 83, 80, 255} // Red - fall detected
|
||||
clr = color.RGBA{239, 83, 80, 255} // Red - fall detected
|
||||
} else if blob.Identity != "" {
|
||||
color = color.RGBA{129, 199, 132, 255} // Green - identified
|
||||
clr = color.RGBA{129, 199, 132, 255} // Green - identified
|
||||
}
|
||||
|
||||
// Draw circle
|
||||
for dy := -4; dy <= 4; dy++ {
|
||||
for dx := -4; dx <= 4; dx++ {
|
||||
if dx*dx+dy*dy <= 16 {
|
||||
img.Set(px+dx, pz+dy, color)
|
||||
img.Set(px+dx, pz+dy, clr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue