Skip to content
This repository was archived by the owner on Jul 2, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ci

on:
pull_request:
push:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: cargo test + clippy + fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy --workspace --all-targets -- -D warnings
- run: cargo test --workspace
11 changes: 7 additions & 4 deletions bno085/src/runtime.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
use std::time::Duration;

use anyhow::{Result, bail};
use phoxal_infra_bus::pubsub::Stamped;
use phoxal_core_component::v1::CapabilityRef;
use phoxal_core_component::v1::capability::Capability;
use phoxal_api_component::v1::capability::accelerometer::Sample as AccelerometerSample;
use phoxal_api_component::v1::capability::gyroscope::Sample as GyroscopeSample;
use phoxal_api_component::v1::capability::imu;
use phoxal_api_component::v1::capability::imu::Sample as ImuSample;
use phoxal_core_component::v1::CapabilityRef;
use phoxal_core_component::v1::capability::Capability;
use phoxal_core_engine::clock::{Schedule, SchedulePolicy, Step};
use phoxal_core_engine::step::{Io, Publisher, Runtime, RuntimeInputs};
use phoxal_core_engine::{EmptyArgs, RobotRuntimeArgs};
use phoxal_infra_bus::pubsub::Stamped;

#[derive(Clone)]
pub struct Config {
Expand All @@ -20,7 +20,10 @@ pub struct Config {
}

impl Config {
pub fn new(component_id: &str, component: &phoxal_core_component::v1::Component) -> Result<Self> {
pub fn new(
component_id: &str,
component: &phoxal_core_component::v1::Component,
) -> Result<Self> {
Ok(Self {
imu: sensor(component_id, component, CapabilityKind::Imu)?,
accelerometer: sensor(component_id, component, CapabilityKind::Accelerometer)?,
Expand Down
11 changes: 7 additions & 4 deletions ddsm115/src/runtime.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use std::time::Duration;

use anyhow::{Result, bail};
use phoxal_infra_bus::pubsub::Stamped;
use phoxal_core_component::v1::CapabilityRef;
use phoxal_core_component::v1::capability::{Capability, MotorCommand};
use phoxal_api_component::v1::capability::encoder::Sample;
use phoxal_api_component::v1::capability::motor::Command;
use phoxal_api_component::v1::capability::{encoder, motor};
use phoxal_core_component::v1::CapabilityRef;
use phoxal_core_component::v1::capability::{Capability, MotorCommand};
use phoxal_core_engine::clock::{Schedule, SchedulePolicy, Step};
use phoxal_core_engine::step::{Io, Publisher, Runtime, RuntimeInputs};
use phoxal_core_engine::{EmptyArgs, RobotRuntimeArgs};
use phoxal_infra_bus::pubsub::Stamped;
use tracing::info;

#[derive(Clone)]
Expand All @@ -20,7 +20,10 @@ pub struct Config {
}

impl Config {
pub fn new(component_id: &str, component: &phoxal_core_component::v1::Component) -> Result<Self> {
pub fn new(
component_id: &str,
component: &phoxal_core_component::v1::Component,
) -> Result<Self> {
let mut actuator_id = None;
let mut actuator_type = None;
let mut encoder = None;
Expand Down
9 changes: 6 additions & 3 deletions vl53l1x/src/runtime.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
use anyhow::{Result, bail};
use phoxal_infra_bus::pubsub::Stamped;
use phoxal_api_component::v1::capability::range::{self, Sample};
use phoxal_core_component::v1::CapabilityRef;
use phoxal_core_component::v1::capability::{Capability, Range as RangeConfig};
use phoxal_api_component::v1::capability::range::{self, Sample};
use phoxal_core_engine::clock::{Schedule, SchedulePolicy, Step};
use phoxal_core_engine::step::{Io, Publisher, Runtime, RuntimeInputs};
use phoxal_core_engine::{EmptyArgs, RobotRuntimeArgs};
use phoxal_infra_bus::pubsub::Stamped;

#[derive(Clone)]
pub struct Config {
range: SampledSensor,
}

impl Config {
pub fn new(component_id: &str, component: &phoxal_core_component::v1::Component) -> Result<Self> {
pub fn new(
component_id: &str,
component: &phoxal_core_component::v1::Component,
) -> Result<Self> {
Ok(Self {
range: Self::inspect(component_id, component)?,
})
Expand Down
Loading