Skip to content

Commit da9c15e

Browse files
premultiplyCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 901829a commit da9c15e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

meters/rs485/dtsu666.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@ func (p *DTSU666Producer) snip(iec Measurement, scaler ...float64) Operation {
5353
Transform: RTUIeee754ToFloat64,
5454
}
5555

56-
operation.Transform = MakeScaledTransform(operation.Transform, scaler[0])
56+
if len(scaler) > 0 {
57+
operation.Transform = MakeScaledTransform(operation.Transform, scaler[0])
58+
}
5759

5860
return operation
5961
}
6062

6163
func (p *DTSU666Producer) Probe() Operation {
62-
return p.snip(VoltageL1)
64+
return p.snip(VoltageL1, 10)
6365
}
6466

6567
func (p *DTSU666Producer) Produce() (res []Operation) {

0 commit comments

Comments
 (0)