Fixing build, formatting

master
Ryan Summers 2021-05-06 12:35:04 +02:00
parent 4cbc826f00
commit 949ea9c1b3
5 changed files with 7 additions and 8 deletions

View File

@ -22,7 +22,7 @@ pub struct ProgrammableGainAmplifier<A0, A1> {
impl Gain {
/// Get the AFE gain as a numerical value.
pub fn as_multiplier (self) -> f32 {
pub fn as_multiplier(self) -> f32 {
match self {
Gain::G1 => 1.0,
Gain::G2 => 2.0,

View File

@ -91,7 +91,7 @@ impl rtic::Monotonic for SystemTimer {
if regs.sr.read().uif().bit_is_clear() {
return (overflows * 65535 + current_value) as i32;
}
}
})
}
}

View File

@ -12,8 +12,8 @@
///! guarantee that the requestee will be informed that settings have been applied.
use heapless::{consts, String};
use crate::hardware::design_parameters::MQTT_BROKER;
use super::{MqttMessage, NetworkReference, SettingsResponse, UpdateState};
use crate::hardware::design_parameters::MQTT_BROKER;
/// MQTT settings interface.
pub struct MiniconfClient<S>

View File

@ -13,16 +13,16 @@ use core::fmt::Write;
mod messages;
mod miniconf_client;
mod shared;
mod network_processor;
mod shared;
mod telemetry;
use crate::hardware::{CycleCounter, EthernetPhy, NetworkStack};
use messages::{MqttMessage, SettingsResponse};
pub use miniconf_client::MiniconfClient;
pub use shared::NetworkManager;
pub use network_processor::NetworkProcessor;
pub use shared::NetworkManager;
pub use telemetry::{Telemetry, TelemetryBuffer, TelemetryClient};
pub type NetworkReference = shared::NetworkStackProxy<'static, NetworkStack>;

View File

@ -11,11 +11,11 @@
///! required immediately before transmission. This ensures that any slower computation required
///! for unit conversion can be off-loaded to lower priority tasks.
use heapless::{consts, String, Vec};
use serde::Serialize;
use minimq::QoS;
use serde::Serialize;
use super::NetworkReference;
use crate::hardware::{AfeGain, design_parameters::MQTT_BROKER};
use crate::hardware::{design_parameters::MQTT_BROKER, AfeGain};
/// The telemetry client for reporting telemetry data over MQTT.
pub struct TelemetryClient<T: Serialize> {
@ -72,7 +72,6 @@ impl TelemetryBuffer {
/// # Returns
/// The finalized telemetry structure that can be serialized and reported.
pub fn finalize(self, afe0: AfeGain, afe1: AfeGain) -> Telemetry {
// The input voltage is measured by the ADC across a dynamic scale of +/- 4.096 V with a
// dynamic range across signed integers. Additionally, the signal is fully differential, so
// the differential voltage is measured at the ADC. Thus, the single-ended signal is