Skip to content

Conversation

@fromeijn
Copy link

  • Added Auto Acknowledgements, for fast turnaround times using hardware support
  • Using Instant for sys_time
  • Fixed sdf timeout size
  • Fix possible overflow in RSSI calculation
  • Tiny bit of cleanup

inspiration: jkelleyrtp/dw1000-rs#157

Copy link
Owner

@ProfFan ProfFan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!

Please use the script in example to generate a set of expected SPI commands and write some unit tests for the state transitions.

Some of the stuff here will conflict with #21 . Let's wait a few days on that PR to see if the author replies.

/// Returns the current system time (accurate to the upper 32-bit)
#[maybe_async_attr]
pub async fn sys_time(&mut self) -> Result<u32, Error<SPI>> {
pub async fn sys_time(&mut self) -> Result<Instant, Error<SPI>> {
Copy link
Owner

Choose a reason for hiding this comment

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

Please don't change this API. You can add a from_sys_time in Instant if you want.

Copy link
Author

Choose a reason for hiding this comment

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

The sys_time is internally 40 bit of the DW3000, only 32 bits are exposed, why should we need to handle this outside of the driver? I think this is really confusing for new users. We can make a translation from one to the other, but not sure if that is the best approach.

Copy link
Owner

Choose a reason for hiding this comment

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

There is a bit of overhead as Instant is internally 64 bits. The other part is API stability, there already exists many users of this library.

data: &[u8],
send_time: SendTime,
config: &Config,
continuation: TxContinuation,
Copy link
Owner

Choose a reason for hiding this comment

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

I like that, but the number of arguments of this function is getting out of control.

Maybe wait until we get #21 's simplifications to the send function in?

@ProfFan
Copy link
Owner

ProfFan commented Feb 23, 2025

Given #21 is merged, could you rebase on current main? Thank you very much!

…r failed/filtered frames

otherwise filtered frames will stop RX
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.

3 participants