dotnet / dotnet/iot

OneWire sensor - override SysfsBusDevicesPath

Open
#2,477 0 comments 0 reactions 0 assignees View on GitHub
api-suggestion Priority:3
Dominant language
C#
Stars
2.4k
Forks
630
Avg merge
11d 3h
Merged PRs (30d)
2

Description

**Is your feature request related to a problem? Please describe.**
I'm trying to implement OneWire Temperature sensor on my RaspberryPi. Everything works great! But, to create a well tested software, I also wanted to create integration tests. So it would be nice to somehow override the **hardcoded const** `SysfsBusDevicesPath` just for testing, to target to a local placed fake temperature sensor files.

**Describe the ideal solution**
The ideal solution in my opinion would be to create some "setter-methods" to override the hardcoded const `SysfsBusDevicesPath`:
https://github.com/dotnet/iot/blob/77d4d79c8332c3659c5666a62b3e1af57b3867c0/src/devices/OneWire/OneWireBus.Linux.cs#L15C31-L15C50

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.