reduce amount of warnings
This commit is contained in:
@@ -113,7 +113,7 @@ pub trait BoardInteraction<'a> {
|
||||
|
||||
impl dyn BoardInteraction<'_> {
|
||||
//the counter is just some arbitrary number that increases whenever some progress was made, try to keep the updates < 10 per second for ux reasons
|
||||
fn progress(&mut self, counter: u32) {
|
||||
fn _progress(&mut self, counter: u32) {
|
||||
let even = counter % 2 == 0;
|
||||
let current = counter / (PLANT_COUNT as u32);
|
||||
for led in 0..PLANT_COUNT {
|
||||
|
||||
@@ -210,7 +210,7 @@ impl<'a> BoardInteraction<'a> for V3<'a> {
|
||||
&self.config
|
||||
}
|
||||
|
||||
fn get_battery_monitor(&mut self) -> &mut Box<(dyn BatteryInteraction + Send + 'static)> {
|
||||
fn get_battery_monitor(&mut self) -> &mut Box<dyn BatteryInteraction + Send + 'static> {
|
||||
&mut self.battery_monitor
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ use anyhow::bail;
|
||||
use embedded_hal::digital::OutputPin;
|
||||
use embedded_hal_bus::i2c::MutexDevice;
|
||||
use esp_idf_hal::gpio::{AnyInputPin, IOPin, InputOutput, Output, PinDriver, Pull};
|
||||
use esp_idf_hal::i2c::{I2cDriver, I2cError};
|
||||
use esp_idf_hal::i2c::I2cDriver;
|
||||
use esp_idf_hal::pcnt::{
|
||||
PcntChannel, PcntChannelConfig, PcntControlMode, PcntCountMode, PcntDriver, PinIndex,
|
||||
};
|
||||
@@ -23,12 +23,10 @@ use ina219::calibration::UnCalibrated;
|
||||
use ina219::configuration::{Configuration, OperatingMode};
|
||||
use ina219::SyncIna219;
|
||||
use measurements::{Current, Resistance, Voltage};
|
||||
use pca9535::{ExpanderError, GPIOBank, Pca9535Immediate, StandardExpanderInterface};
|
||||
use pca9535::{GPIOBank, Pca9535Immediate, StandardExpanderInterface};
|
||||
use std::result::Result::Ok as OkStd;
|
||||
use embedded_can::nb::Can;
|
||||
use embedded_can::Frame;
|
||||
use embedded_can::StandardId;
|
||||
use esp_idf_hal::prelude::*;
|
||||
use esp_idf_hal::can;
|
||||
|
||||
pub enum Charger<'a> {
|
||||
@@ -205,7 +203,7 @@ pub(crate) fn create_v4(
|
||||
println!("Can bus mode ");
|
||||
let timing = can::config::Timing::B25K;
|
||||
let config = can::config::Config::new().timing(timing);
|
||||
let mut can = can::CanDriver::new(peripherals.can, peripherals.gpio0, peripherals.gpio2, &config).unwrap();
|
||||
let can = can::CanDriver::new(peripherals.can, peripherals.gpio0, peripherals.gpio2, &config).unwrap();
|
||||
|
||||
|
||||
let frame = StandardId::new(0x042).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user