Skip to content

Commit

Permalink
Feature: get signal strength (#82)
Browse files Browse the repository at this point in the history
* Add feature gates for module timing for lara-r6 & toby-r2

* get signal strength

* chore(*): add feature gates for module timing for lara-r6 & toby-r2 (#81)

* Add feature gates for module timing for lara-r6 & toby-r2

* Bump embedded-hal to rc.1

* cargo alpha 11 fix

* chore(*): add feature gates for module timing for lara-r6 & toby-r2 (#81)

* Add feature gates for module timing for lara-r6 & toby-r2

* Bump embedded-hal to rc.1

* chore(*): use latest atat, with new urc channel & replace fugit with embassy-time (#83)

* - Update ATAT, and implement the new URC subscriber channels
- Remove `fugit` and replace it with `embassy-time`
- Update `ublox-sockets`, facilitating both of above changes
- Remove unimplemented sms, voice and location service skeletons
- Remove pin generics in favor of a single `CellularConfig` trait with associated types

* Make flowcontrol a bool in config trait, and export config trait

* Use latest atat git rev

* Fix sometimes stuck in infinite loop at AT probing on initialization

* Update CI to use nightly and remove unused workflows

* cellular signal strength function wrong merge

---------

Co-authored-by: Mathias <[email protected]>
  • Loading branch information
KennethKnudsen97 and MathiasKoch authored Sep 20, 2023
1 parent 15efe78 commit d72694a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
13 changes: 11 additions & 2 deletions ublox-cellular/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ doctest = false

[dependencies]
# atat = { version = "0.18", features = ["derive", "bytes"] }
atat = { git = "https://github.com/BlackbirdHQ/atat", rev = "c5caaf7", features = ["derive", "defmt", "bytes"] }
atat = { git = "https://github.com/BlackbirdHQ/atat", rev = "c5caaf7", features = [
"derive",
"defmt",
"bytes",
] }
embedded-hal = "=1.0.0-rc.1"
embedded-nal = "0.6"
hash32 = "^0.2.1"
Expand All @@ -41,7 +45,12 @@ default = ["socket-udp", "socket-tcp"]
async = ["atat/async"]

# Use `defmt-impl to enable defmt based logging
defmt-impl = ["defmt", "ublox-sockets/defmt", "atat/defmt", "heapless/defmt-impl"]
defmt-impl = [
"defmt",
"ublox-sockets/defmt",
"atat/defmt",
"heapless/defmt-impl",
]
# Use `log-impl` to enable log based logging
log-impl = ["log", "ublox-sockets/log", "atat/log"]

Expand Down
8 changes: 6 additions & 2 deletions ublox-cellular/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ use crate::{
SetGpioConfiguration,
},
network_service::{
responses::OperatorSelection, types::OperatorSelectionMode, GetOperatorSelection,
SetOperatorSelection,
responses::{OperatorSelection, SignalQuality},
types::OperatorSelectionMode,
GetOperatorSelection, GetSignalQuality, SetOperatorSelection,
},
psn::{types::PSEventReportingMode, SetPacketSwitchedEventReporting},
},
Expand Down Expand Up @@ -160,6 +161,9 @@ where
self.sockets.take()
}

pub fn signal_strength(&mut self) -> Result<SignalQuality, Error> {
self.send_at(&GetSignalQuality)
}
/// Run modem state machine
///
/// Turns on modem if needed and processes URCs.
Expand Down

0 comments on commit d72694a

Please sign in to comment.