Skip to content

Conversation

@stargazing-dino
Copy link
Contributor

A few misc changes:

The transfer method in embedded-hal 1.0.0 is called transfer_in_place

And some generic errors are now SPI::Error

@stargazing-dino stargazing-dino marked this pull request as draft July 17, 2025 17:59
@stargazing-dino stargazing-dino marked this pull request as ready for review July 17, 2025 18:22
@stargazing-dino
Copy link
Contributor Author

sorry alotta commits, i had to develop using CI because I don't have a linux box

@RandomInsano This is ready to review

@RandomInsano
Copy link
Owner

All good, the noise doesn't bother me. From my quick scan of things it all looks good!

I'd like to try and get this tested on my Pi... Do you want to do some conditional compilation for your platform and make sure you can run the examples you have hardware for? I don't mind reviewing a larger blob. Maybe a branch from this branch if you'd like to keep the history sane.

If I can't get it tested by Monday I'll just merge it all in.

@stargazing-dino
Copy link
Contributor Author

Yeah that sounds good

Since i'm targeting rp2350 I'm not sure I'll need any conditional compilation for my use case. I was thinking of adding more tests mainly through https://github.com/dbrgn/embedded-hal-mock but haven't used it before so I'll have to dig some more

I'll do some personal tests based off this branch very soon and let you know how it goes

@stargazing-dino
Copy link
Contributor Author

IMG_4973

137.336249 [INFO ]   Left Stick: X=80, Y=7f (rust_in_peace battle_bot/src/main.rs:194)
137.336272 [INFO ]   Right Stick: X=80, Y=7f (rust_in_peace battle_bot/src/main.rs:198)
137.388018 [INFO ] DualShock 2 (Pressure mode): (rust_in_peace battle_bot/src/main.rs:193)
137.388032 [INFO ]   Left Stick: X=80, Y=7f (rust_in_peace battle_bot/src/main.rs:194)
137.388054 [INFO ]   Right Stick: X=80, Y=7f (rust_in_peace battle_bot/src/main.rs:198)
137.439800 [INFO ] DualShock 2 (Pressure mode): (rust_in_peace battle_bot/src/main.rs:193)
137.439814 [INFO ]   Left Stick: X=80, Y=7f (rust_in_peace battle_bot/src/main.rs:194)

I tested this PR with my board and everything seems to work fine

@RandomInsano
Copy link
Owner

Great! I'm convinced! Merging

@RandomInsano RandomInsano merged commit d3d17a9 into RandomInsano:master Jul 21, 2025
2 checks passed
@RandomInsano
Copy link
Owner

Had a very quick look at embedded-hal-mock and it's definitely the way to go. I don't think there's much value in mocking the different controller types but making sure everything on say the DualShock 2 works would be enough. The controllers themselves are never going to change, so we'd only want to test that we're using the HAL properly.

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.

2 participants