New smartmeter

This commit is contained in:
2025-07-16 15:20:39 +02:00
parent abe9328460
commit 40d4956be3
7 changed files with 22 additions and 14 deletions

View File

@@ -8,14 +8,14 @@ class ConfirmingSyncPatternState < StatePattern::State
while (idx < bytes.length && idx < sync_length && bytes[idx] == Synchronizer::SYNC_PATTERN[idx]) do idx = idx+1 end
if (idx == sync_length)
#p "Sync pattern confirmed"
p "Sync pattern confirmed"
transition_to(InSyncState)
else
#p "Back to SearchingForSync state. idx = #{idx}."
p "Back to SearchingForSync state. idx = #{idx}."
transition_to(SearchingForSyncState)
end
# return the rest
return bytes[idx+1..-1] || ""
end
end
end