Skip to content
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
122 changes: 61 additions & 61 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ cortex-m-rt = "0.7.1"
critical-section = "1.1"
defmt = "0.3.2"
defmt-rtt = "0.4"
driver-services = { path = "./common/driver-services" }
embassy-embedded-hal = { version = "0.3.0", features = ["defmt"] }
embassy-executor = { version = "0.7.0", features = ["defmt"] }
embassy-futures = { version = "0.1.0", features = ["defmt"] }
Expand All @@ -42,16 +41,17 @@ embedded-io = { version = "0.6.1" }
embedded-io-async = { version = "0.6.1" }
enum_dispatch = "0.3.11"
heapless = "0.9.1"
high-level-services = { path = "./common/high-level-services" }
libm = "0.2.11"
nb = "1.1.0"
num-traits = { version = "0.2.19", default-features = false }
panic-probe = { version = "0.3", features = ["print-defmt"] }
peripheral-services = { path = "./common/peripheral-services" }
prost = { version = "0.14.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.150", features = ["derive"], default-features = false }
serde-csv-core = { version = "0.3.2", features = ["defmt"] }
smlang = "0.8.0"
static_cell = "2"
uor-drivers = { path = "./common/drivers" }
uor-high-level = { path = "./common/high-level" }
uor-peripherals = { path = "./common/peripherals" }
uor-proc-macros = { path = "./common/uor-proc-macros" }
uor-utils = { path = "./common/uor-utils" }
4 changes: 2 additions & 2 deletions boards/argus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,20 @@ embedded-test = { version = "0.6.2", features = ["defmt", "embassy"] }
enum_dispatch = { workspace = true }
grounded = "0.2.0"
heapless = { workspace = true }
high-level-services = { workspace = true }
itoa = { version = "1.0.15", features = ["no-panic"] }
libm = { workspace = true, default-features = false }
micromath = "2.0.0"
num-traits = { workspace = true, features = ["libm"] }
panic-probe = { workspace = true }
peripheral-services = { workspace = true, features = ["messages"] }
pid = "4.0.0"
prost = { workspace = true }
serde = { workspace = true, features = ["derive", "serde_derive"] }
smlang = { workspace = true }
static_cell = { workspace = true }
stm32-fmc = "0.3.0"
strum = { version = "0.27.2", default-features = false, features = ["derive"] }
uor-high-level = { workspace = true }
uor-peripherals = { workspace = true, features = ["messages"] }
uor-utils = { workspace = true, features = ["messages"] }

[[test]]
Expand Down
6 changes: 3 additions & 3 deletions boards/argus/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ use embassy_stm32::gpio::Pin;
use embassy_stm32::usart::Uart;
use embassy_stm32::{bind_interrupts, peripherals, usart};
use panic_probe as _;
use peripheral_services::serial::service::SerialService;
use serde::ser;
use static_cell::StaticCell;
use strum::EnumCount;
use uor_peripherals::serial::peripheral::UORSerial;
use uor_utils::messages::argus::envelope::{Node, NodeType};
use uor_utils::utils::{hal::configure_hal, types::AsyncMutex};

Expand All @@ -37,7 +37,7 @@ bind_interrupts!(struct InterruptRequests {
// And wrapped around a mutex so they can be accessed safely from multiple async tasks
static SD_CARD_SERVICE: StaticCell<AsyncMutex<SDCardService>> = StaticCell::new();
static ADC_SERVICE: StaticCell<AsyncMutex<AdcService<{ AdcDevice::COUNT }>>> = StaticCell::new();
static SERIAL_SERVICE: StaticCell<AsyncMutex<SerialService>> = StaticCell::new();
static SERIAL_SERVICE: StaticCell<AsyncMutex<UORSerial>> = StaticCell::new();
static SESSION_SERVICE: StaticCell<AsyncMutex<SessionService>> = StaticCell::new();
static LED_INDICATOR_SERVICE: StaticCell<AsyncMutex<LedIndicatorService<2>>> = StaticCell::new();
static STATE_MACHINE_ORCHESTRATOR: StaticCell<AsyncMutex<StateMachineOrchestrator>> = StaticCell::new();
Expand Down Expand Up @@ -98,7 +98,7 @@ async fn main(spawner: Spawner) {
],
)));
let serial_service = SERIAL_SERVICE.init(AsyncMutex::new(
SerialService::new(
UORSerial::new(
peripherals.UART7,
peripherals.PE8,
peripherals.PE7,
Expand Down
6 changes: 3 additions & 3 deletions boards/argus/src/pressure/service.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use defmt::{error, info};
use embassy_time::{Instant, Timer};
use peripheral_services::serial::service::SerialService;
use strum::EnumCount;
use uor_peripherals::serial::peripheral::UORSerial;
use uor_utils::utils::types::AsyncMutex;

use crate::adc::driver::types::{DataRate, Filter, Gain, ReferenceRange};
Expand All @@ -20,7 +20,7 @@ pub struct PressureService<const ADC_COUNT: usize> {
// Other services are passed by a mutex to ensure safe concurrent access
pub adc_service: &'static AsyncMutex<AdcService<ADC_COUNT>>,
pub sd_card_service: &'static AsyncMutex<SDCardService>,
pub serial_service: &'static AsyncMutex<SerialService>,
pub serial_service: &'static AsyncMutex<UORSerial>,
pub session_service: &'static AsyncMutex<SessionService>,

// Linear transformations that are applied on top of the raw readings for each ADC and channel
Expand All @@ -31,7 +31,7 @@ impl<const ADC_COUNT: usize> PressureService<ADC_COUNT> {
pub fn new(
adc_service: &'static AsyncMutex<AdcService<ADC_COUNT>>,
sd_card_service: &'static AsyncMutex<SDCardService>,
serial_service: &'static AsyncMutex<SerialService>,
serial_service: &'static AsyncMutex<UORSerial>,
session_service: &'static AsyncMutex<SessionService>,
) -> Self {
Self {
Expand Down
4 changes: 2 additions & 2 deletions boards/argus/src/pressure/tasks/log_measurements.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use defmt::info;
use embassy_executor::task;
use heapless::format;
use peripheral_services::serial::service::SerialService;
use strum::EnumCount;
use uor_peripherals::serial::peripheral::UORSerial;
use uor_utils::csv::SerializeCSV;
use uor_utils::messages::argus::envelope::envelope::Message;
use uor_utils::utils::types::AsyncMutex;
Expand All @@ -20,7 +20,7 @@ use crate::state_machine::types::States;
#[task]
pub async fn log_measurements(
mut worker: StateMachineWorker,
serial_service_mutex: &'static AsyncMutex<SerialService>,
serial_service_mutex: &'static AsyncMutex<UORSerial>,
sd_card_service_mutex: &'static AsyncMutex<SDCardService>,
session_service: &'static AsyncMutex<SessionService>,
) {
Expand Down
2 changes: 1 addition & 1 deletion boards/argus/src/pressure/types/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use defmt::Format;
use derive_more::From;
use peripheral_services::serial::service::UsartError;
use uor_peripherals::serial::peripheral::UsartError;

use crate::adc::service::AdcError;
use crate::sd::types::SdCardError;
Expand Down
6 changes: 3 additions & 3 deletions boards/argus/src/strain/service.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use defmt::error;
use embassy_time::{Instant, Timer};
use peripheral_services::serial::service::SerialService;
use strum::EnumCount;
use uor_peripherals::serial::peripheral::UORSerial;
use uor_utils::utils::types::AsyncMutex;

use crate::adc::driver::types::{DataRate, Filter, Gain, ReferenceRange};
Expand All @@ -20,7 +20,7 @@ pub struct StrainService<const ADC_COUNT: usize> {
// Other services are passed by a mutex to ensure safe concurrent access
pub adc_service: &'static AsyncMutex<AdcService<ADC_COUNT>>,
pub sd_card_service: &'static AsyncMutex<SDCardService>,
pub serial_service: &'static AsyncMutex<SerialService>,
pub serial_service: &'static AsyncMutex<UORSerial>,
pub session_service: &'static AsyncMutex<SessionService>,

// Linear transformations that are applied on top of the raw readings for each ADC and channel
Expand All @@ -31,7 +31,7 @@ impl<const ADC_COUNT: usize> StrainService<ADC_COUNT> {
pub fn new(
adc_service: &'static AsyncMutex<AdcService<ADC_COUNT>>,
sd_card_service: &'static AsyncMutex<SDCardService>,
serial_service: &'static AsyncMutex<SerialService>,
serial_service: &'static AsyncMutex<UORSerial>,
session_service: &'static AsyncMutex<SessionService>,
) -> Self {
Self {
Expand Down
4 changes: 2 additions & 2 deletions boards/argus/src/strain/tasks/log_measurements.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use defmt::info;
use embassy_executor::task;
use heapless::format;
use peripheral_services::serial::service::SerialService;
use strum::EnumCount;
use uor_peripherals::serial::peripheral::UORSerial;
use uor_utils::csv::SerializeCSV;
use uor_utils::messages::argus::envelope::envelope::Message;
use uor_utils::utils::types::AsyncMutex;
Expand All @@ -20,7 +20,7 @@ use crate::strain::types::{StrainChannel, StrainReading};
#[task]
pub async fn log_measurements(
mut worker: StateMachineWorker,
serial_service_mutex: &'static AsyncMutex<SerialService>,
serial_service_mutex: &'static AsyncMutex<UORSerial>,
sd_card_service_mutex: &'static AsyncMutex<SDCardService>,
session_service: &'static AsyncMutex<SessionService>,
) {
Expand Down
2 changes: 1 addition & 1 deletion boards/argus/src/strain/types/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use defmt::Format;
use derive_more::From;
use peripheral_services::serial::service::UsartError;
use uor_peripherals::serial::peripheral::UsartError;

use crate::adc::service::AdcError;
use crate::sd::types::SdCardError;
Expand Down
6 changes: 3 additions & 3 deletions boards/argus/src/temperature/service.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use defmt::{error, info};
use embassy_time::{Instant, Timer};
use peripheral_services::serial::service::SerialService;
use strum::EnumCount;
use uor_peripherals::serial::peripheral::UORSerial;
use uor_utils::utils::types::AsyncMutex;

use crate::adc::driver::types::{AnalogChannel, DataRate, Filter, Gain, ReferenceRange};
Expand All @@ -22,7 +22,7 @@ pub struct TemperatureService<const ADC_COUNT: usize> {
// Other services are passed by a mutex to ensure safe concurrent access
pub adc_service: &'static AsyncMutex<AdcService<ADC_COUNT>>,
pub sd_card_service: &'static AsyncMutex<SDCardService>,
pub serial_service: &'static AsyncMutex<SerialService>,
pub serial_service: &'static AsyncMutex<UORSerial>,
pub session_service: &'static AsyncMutex<SessionService>,

// Store the last RTD reading in Celsius to use for cold junction compensation
Expand All @@ -38,7 +38,7 @@ impl<const ADC_COUNT: usize> TemperatureService<ADC_COUNT> {
pub fn new(
adc_service: &'static AsyncMutex<AdcService<ADC_COUNT>>,
sd_card_service: &'static AsyncMutex<SDCardService>,
serial_service: &'static AsyncMutex<SerialService>,
serial_service: &'static AsyncMutex<UORSerial>,
session_service: &'static AsyncMutex<SessionService>,
) -> Self {
Self {
Expand Down
Loading
Loading