Fixing build, formatting

This commit is contained in:
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

@ -91,7 +91,7 @@ impl rtic::Monotonic for SystemTimer {
if regs.sr.read().uif().bit_is_clear() { if regs.sr.read().uif().bit_is_clear() {
return (overflows * 65535 + current_value) as i32; 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. ///! guarantee that the requestee will be informed that settings have been applied.
use heapless::{consts, String}; use heapless::{consts, String};
use crate::hardware::design_parameters::MQTT_BROKER;
use super::{MqttMessage, NetworkReference, SettingsResponse, UpdateState}; use super::{MqttMessage, NetworkReference, SettingsResponse, UpdateState};
use crate::hardware::design_parameters::MQTT_BROKER;
/// MQTT settings interface. /// MQTT settings interface.
pub struct MiniconfClient<S> pub struct MiniconfClient<S>

View File

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

View File

@ -11,11 +11,11 @@
///! required immediately before transmission. This ensures that any slower computation required ///! required immediately before transmission. This ensures that any slower computation required
///! for unit conversion can be off-loaded to lower priority tasks. ///! for unit conversion can be off-loaded to lower priority tasks.
use heapless::{consts, String, Vec}; use heapless::{consts, String, Vec};
use serde::Serialize;
use minimq::QoS; use minimq::QoS;
use serde::Serialize;
use super::NetworkReference; 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. /// The telemetry client for reporting telemetry data over MQTT.
pub struct TelemetryClient<T: Serialize> { pub struct TelemetryClient<T: Serialize> {
@ -72,7 +72,6 @@ impl TelemetryBuffer {
/// # Returns /// # Returns
/// The finalized telemetry structure that can be serialized and reported. /// The finalized telemetry structure that can be serialized and reported.
pub fn finalize(self, afe0: AfeGain, afe1: AfeGain) -> Telemetry { 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 // 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 // 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 // the differential voltage is measured at the ADC. Thus, the single-ended signal is