dotnet / dotnet/iot

4 times Thread.Sleep(1) in Nrf24l01 Send ... why?

Open
#2,419 1 comment 1 reaction 2 assignees Claimed by @raffaeler View on GitHub
enhancement Priority:3
Dominant language
C#
Stars
2.4k
Forks
630
Avg merge
11d 3h
Merged PRs (30d)
2

Description

Hello,

I was looking at this library (Iot.Device.Bindings), considering to use it with my raspberry pi project. I want to use the Nrf24l01 wrapper. But when I checked it out internally, I noticed that its Send() method has 4x Thread.Sleep(1) inside it. This would massively slow down my sending rate. I want my nrf to only send data, never receive anything, and I want to send data rapidly. So why is the Send implemented like this, switching back to receive after every send and having those sleeps?

[ Thread.Sleep(1);](https://github.com/dotnet/iot/blob/945495e9fb4c48e964b83d87127befd31fddfb25/src/devices/Nrf24l01/Nrf24l01.cs#L184)

I would suggest that in Send there should be simple write of the data and nothing else.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.