Skip to content

Conversation

@JurajSadel
Copy link
Contributor

This PR doesn't address points 1, 4, and 5 from the issue as I don't think it's a correct thing to do.

closes #4832

@JurajSadel JurajSadel added the skip-changelog No changelog modification needed label Jan 22, 2026
@JurajSadel JurajSadel changed the title esp-radio: Use types from esp_hal::time where appropriate esp-radio: Use types from esp_hal::time where appropriate Jan 22, 2026
channel: (*rx_cntl).channel(),
secondary_channel: SecondaryChannel::from_raw((*rx_cntl).secondary_channel()),
timestamp: Duration::from_micros((*rx_cntl).timestamp().into()),
timestamp: Instant::EPOCH + Duration::from_micros((*rx_cntl).timestamp() as u64),
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this already a timestamp, why are we now adding EPOCH to it?

Copy link
Contributor Author

@JurajSadel JurajSadel Jan 22, 2026

Choose a reason for hiding this comment

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

I think we want to have an Instant instead of Duration for the timestamp fields - and with this way we can return an Instant. Maybe there is a more elegant way?
EDIT: And EPOCH is pub const EPOCH: Instant = Instant(InnerInstant::from_ticks(0)); so it should be the same.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems it's just because there is no way to "just create" an Instant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog No changelog modification needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use types from esp_hal::time where appropriate

3 participants