Skip to content

Release 1.10.4: Day/Night offsets and Modbus text padding - #40

Merged
Mo3he merged 2 commits into
mainfrom
release/1.10.4
Nov 26, 2026
Merged

Mo3he merged 2 commits into
mainfrom
release/1.10.4

Conversation

@Mo3he

@Mo3he Mo3he commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Release 1.10.4. Full notes in RELEASE_NOTES.md.

New

  • Day / Night condition: sunrise and sunset offsets in minutes (customer request: keep a Night-Only rule active until an hour after sunrise).
  • Modbus Write: fill pads text with NUL (default) or spaces, text left / right / centered (Modbus extension #20). The editor shows Encoding only for text and explains that Length counts 2-byte registers (Modbus extension #20).

Fixes

  • Day / Night conditions and Sunrise/Sunset triggers without coordinates read the Location setting from the wrong place and used 0°N, 0°E.
  • Day / Night was Night all day where local sunset falls after midnight, and failed for both Day and Night in polar regions.
  • The Day / Night preview in the editor only updated after saving and reopening the rule; it now updates as you type.
  • The Rules page waited for every capability lookup; the editor discarded unsaved edits when a list finished loading, and adding or removing a row reset schedule days and geofence polygons.
  • Missing rule-card labels for Modbus Write and the GPS triggers.

Upgrade notes: Night-Only rules without coordinates now follow the camera Location setting; polar night now passes a Night condition.

Tested

  • New tools/scheduler_test.c (offset boundaries to the second, midnight crossing, Reykjavik, Tonga UTC+13, Tromsø polar night and midnight sun) and extended Modbus codec tests; both pass with clang and with gcc on Ubuntu.
  • On a P3288-LV (AXIS OS 12.11): live Day/Night rules (Stockholm, Longyearbyen polar night); Modbus writes for every fill mode captured byte-for-byte by a Modbus TCP server; editor save/reopen for offsets, Encoding and Fill; edits kept through a capability refresh and through adding/removing rows.
  • Independent code review in two rounds; the one issue found (days/polygon reset on re-render) is fixed.

Day/Night condition:
- Optional sunrise_offset_minutes / sunset_offset_minutes (±720), with a
  live preview in the editor.
- Without rule coordinates (or 0, 0), conditions and Sunrise/Sunset
  triggers now read the Location setting from settings.engine.
- The day window may cross midnight (sunset offsets, or local sunset after
  00:00 as in Reykjavik in June); polar night counts as night and midnight
  sun as day, where the condition used to fail for both.
- tools/scheduler_test.c covers these and runs in CI.

Modbus Write: "fill" pads text with NUL (default) or spaces with the text
left, right or centered. The editor hides Encoding for non-text rows and
explains that Length counts 2-byte registers.

Rule editor: the rule list loads before slower capability lookups; lists
that finish loading no longer discard unsaved edits, and re-rendering keeps
schedule days, geofence polygons and an open new-event form. Rule cards get
labels for Modbus Write and the GPS triggers.
@Mo3he
Mo3he merged commit cf414d1 into main Nov 26, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant