Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

restructured the project to have each interface in one folder. #45

Merged
merged 2 commits into from
Mar 20, 2020

Conversation

DanielSSilva
Copy link
Contributor

This PR suggests a new file structure.
Essentially what I did was to separate each interface in their own folder, where each folder has the interface object and subfolders with the Verbs of the cmdlets.
e.g:
image
In my opinion, this seems more organized and easier to understand/search for code, especially for newcomers.
Also, this follows the file structure of the dotnet/iot repo

NOTE: I'm currently trying to understand the test setup and still have to test if everything is working, even though the project compiled. For that reason, this should not be merged yet.

@anmenaga
Copy link

@DanielSSilva have you seen such PlatformNotSupportedException?
System.Device.I2c.* operations seem to work fine when run from a simple C# test app on raspberry pi; but as soon as they are called from pwsh they fail with this:

System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Device.I2c.I2cConnectionSettings..ctor(Int32 busId, Int32 deviceAddress)
at hello_netcore3.GetI2CDevice.ProcessRecord()

@DanielSSilva
Copy link
Contributor Author

Yap I've seen it. IIRC you have to build with -r linux-arm. Let me search the issue

@DanielSSilva
Copy link
Contributor Author

dotnet/iot#863
Here. It's the same case?

@anmenaga
Copy link

Yes; with dotnet publish -r linux-arm this works; thank you.

I think we need to merge this so that we can work on smaller items based on this major refactoring work.

@anmenaga anmenaga marked this pull request as ready for review March 19, 2020 23:22
@DanielSSilva
Copy link
Contributor Author

Agreed. I2C is working as expected (as far as I could test).
Last time I've picked this, I've opened a bug/question to the dotnet iot team. Haven't had the time to get back to this
dotnet/iot#939

@anmenaga anmenaga merged commit c1f04d7 into PowerShell:master Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants