Skip to content

Commit

Permalink
Refactor library to remove dependency on Position
Browse files Browse the repository at this point in the history
The position of devices was previously managed by the Pica
context instance and updated by pica commands such as
SetPosition/InitUciDevice.

This change introduces the RangingEstimator trait, and adds
an instance of ranging estimator to the parameters of the
Pica::new() function.

Instead of relying on device positions, ranging measurements
are now produced by the owned instance of RangingEstimator.

The http server _which receives HTTP requests to update
device positions_ now caches the device positions instead of the
Pica context, and implements a RangingEstimator to pass
to the Pica context.
  • Loading branch information
hchataing committed Feb 9, 2024
1 parent e3fd148 commit 99f6638
Show file tree
Hide file tree
Showing 8 changed files with 708 additions and 557 deletions.
11 changes: 8 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors = [
"David De Jesus Duarte <licorne@google.com>",
"Henri Chataing <henrichataing@google.com>",
]
default-run = "pica-server"
default-run = "pica"
exclude = [
"res/*",
"scripts/*"
Expand All @@ -28,8 +28,13 @@ name = "pica"
path = "src/lib.rs"

[[bin]]
name = "pica-server"
path = "src/bin/server/mod.rs"
name = "pica"
path = "src/bin/main.rs"

[[bin]]
name = "pica-http"
path = "src/bin/http-server/main.rs"
features = ["web"]

[features]
default = ["web"]
Expand Down
Loading

0 comments on commit 99f6638

Please sign in to comment.