chore: modernize

This commit is contained in:
andig 2026-05-05 08:43:23 +02:00
parent 0eca536c9e
commit 77067ef783
3 changed files with 7 additions and 7 deletions

View file

@ -224,7 +224,7 @@ func modbusCRC16(data []byte) []byte {
crc := uint16(0xFFFF)
for _, b := range data {
crc ^= uint16(b)
for i := 0; i < 8; i++ {
for range 8 {
if crc&0x0001 != 0 {
crc = (crc >> 1) ^ 0xA001
} else {