Skip to content

feat: send originate_timestamp in NTPClient query in ntps module#32

Merged
michealroberts merged 1 commit intomainfrom
feature/client/NTPClient/originate_timestamps
May 28, 2025
Merged

feat: send originate_timestamp in NTPClient query in ntps module#32
michealroberts merged 1 commit intomainfrom
feature/client/NTPClient/originate_timestamps

Conversation

@michealroberts
Copy link
Owner

feat: send originate_timestamp in NTPClient query in ntps module

feat: send originate_timestamp in NTPClient query in ntps module
@michealroberts michealroberts requested a review from Copilot May 28, 2025 14:15
@michealroberts michealroberts self-assigned this May 28, 2025
@michealroberts michealroberts added the enhancement New feature or request label May 28, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds functionality to include the originate_timestamp in the NTP client request packet.

  • Refactors the request packet creation to use a mutable bytearray
  • Computes and packs the originate_timestamp high/low values into the correct byte positions
Comments suppressed due to low confidence (1)

src/ntps/client.py:64

  • Ensure that the new originate_timestamp logic is covered by unit tests to verify that the high and low parts are correctly calculated and packed.
now = time() + NTP_TIMESTAMP_DELTA

@michealroberts michealroberts merged commit 878d5be into main May 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants