-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace embedded-time with fugit #54
Replace embedded-time with fugit #54
Conversation
And use ublox-sockets that support fugit time crate.
`embedded-time` has some serious issues and moves too slowly and tries to do too much in single lib. Fugit is a time library that was built because some people were not happy to use embedded-time on embedded systems. Fugit only deals with time conversions and those conversions are done using const generics. So most of the stuff is happening during compilation. This is very light weight compared to embedded-time.
Ahaa, I think I know why I did not see these errors. I added
Edit: nope that wasn't the problem |
I just realized that It would be actually better if we use Lemme think about it some more. |
Yeah . The timer stuff across the stack is not ideal, so i am very much open to solutions that would make it easier to use.. It is very much affected by the currently bad shape of the timer traits in embedded Hal.. also the requirement on into 🥲 |
the same is used in rtic and it is more clear what it is
|
This looks amazing! Awesome job so far! Hope i can find the time to review both atat & this tomorrow 🤞👌 |
FactbirdHQ#53) * Make sure the embedded-nal implementations only makes use of error-types from ublox-sockets * Add embedded-hal-driver keyword to crates.io # Conflicts: # ublox-cellular/Cargo.toml # ublox-cellular/src/services/data/tcp_stack.rs # ublox-cellular/src/services/data/udp_stack.rs
|
Hmm, I guess cherry-picking your latest commit was not right thing to do (this conflict message here). |
From trait cannot be used here because Clock error is associated type
|
It makes most sense if Format is implemented for fugit types: korken89/fugit#6 |
on macos dummy gpio support is used
Can you update this PR to make use of atat 0.14.0 & ublox-sockets 0.1.0 releases as well? |
Yes. Adding those and starting to use |
I wonder how to enable [dependencies]
atat = { version = "0.14", features = ["derive", "log", "bytes"] }
ublox-sockets = { version = "0.1", features = ["log"] }
log = { version = "^0.4", default-features = false, optional = true }
defmt = { version = "^0.2", optional = true }
[features]
default = ['log", "toby-r2", "socket-udp", "socket-tcp"]
lara-r2 = []
leon-g1 = []
lisa-u2 = []
mpci-l2 = []
sara-g3 = []
sara-g4 = []
sara-u1 = []
sara-u2 = ["upsd-context-activation"]
toby-l2 = []
toby-r2 = []
topy-l4 = []
upsd-context-activation = []
socket-tcp = ["ublox-sockets/socket-tcp"]
socket-udp = ["ublox-sockets/socket-udp"]
defmt-default = ["defmt"]
defmt-trace = ["defmt"]
defmt-debug = ["defmt"]
defmt-info = ["defmt"]
defmt-warn = ["defmt"]
defmt-error = ["defmt"] |
without those it returns immediately without blocking in place
FYI: this is not dropped, I am continuing with it quite soon. |
No problem 👍 Let med know if you need anything from me :) Merry Christmas 🎄 |
Finally back in hacking with it. At the moment I am working on SARA-N310 support. |
FactbirdHQ/atat#113 merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind updating this to embedded-hal: "^1.0.0-alpha.6"
and `defmt: "^0.3", now that FactbirdHQ/atat#113 is merged?
macOS creates those nasty files
Updated, but waiting for new |
Yeah, i also have a few PRs blocked on that, so it will be out during today. Just want to check if FactbirdHQ/atat#115 makes any significant code-size changes first |
|
* Cargo.toml: replace embedded-time with fugit And use ublox-sockets that support fugit time crate. * lib: introduce new Clock trait and Instant alias * replace embedded-time with fugit `embedded-time` has some serious issues and moves too slowly and tries to do too much in single lib. Fugit is a time library that was built because some people were not happy to use embedded-time on embedded systems. Fugit only deals with time conversions and those conversions are done using const generics. So most of the stuff is happening during compilation. This is very light weight compared to embedded-time. * rename FREQ_HZ to TIMER_HZ the same is used in rtic and it is more clear what it is * lib: export Clock from atat * use Clock trait from atat lib * examples: update common_lib to latest * examples: linux wip * Make sure the embedded-nal implementations only makes use of error-ty… (#53) * Make sure the embedded-nal implementations only makes use of error-types from ublox-sockets * Add embedded-hal-driver keyword to crates.io # Conflicts: # ublox-cellular/Cargo.toml # ublox-cellular/src/services/data/tcp_stack.rs # ublox-cellular/src/services/data/udp_stack.rs * test_helpers: update to WouldBlock based Clock * error: add helper to convert Clock error to Error::Generic From trait cannot be used here because Clock error is associated type * client: use nb::block to wait for timer * import atat from blackbirdhq master * use fugit defmt feature to get Format impl * linux: set_socket_storage * add IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr to prelude * linux example: add socket read/write * reexport fugit fugit is needed for implementing Clock trait therefore it makes sense to reexport it here * add some general documentation about the crate * make first examples buildable also on macos on macos dummy gpio support is used * rename linux example to sockets, add args support * power: add nb::block! for blocking timer.waits without those it returns immediately without blocking in place * use atat and ublox-sockets from crates.io * use fmt.rs to support log or defmt * examples: add better logging * update to embedded-hal 1.0.0-alpha.6 * add .DS_Store to .gitignore macOS creates those nasty files * update atat and ublox-sockets * Update ublox-cellular/Cargo.toml * Replace CharVec with Bytes, following deprecation warning in ATAT * Fix tests & add defmt-impl feature Co-authored-by: Andres Vahter <[email protected]> Co-authored-by: Andres Vahter <[email protected]>
Merged here: #57 |
This PR replaces
embedded-time
with more lightweight const generics based time library called fugit which is for example going to be used in RTIC.embedded-time
had some dependencies that did not work well on ESP32, this PR fixes this particular problem.