started cleanup and moving from std to no_std
This commit is contained in:
@@ -52,7 +52,7 @@ impl Charger<'_> {
|
||||
operating_mode: OperatingMode::PowerDown,
|
||||
})
|
||||
.map_err(|e| {
|
||||
println!(
|
||||
log::info!(
|
||||
"Error setting ina mppt configuration during deep sleep preparation{:?}",
|
||||
e
|
||||
);
|
||||
@@ -133,7 +133,7 @@ pub(crate) fn create_v4(
|
||||
battery_monitor: Box<dyn BatteryInteraction + Send>,
|
||||
rtc_module: Box<dyn RTCModuleInteraction + Send>,
|
||||
) -> anyhow::Result<Box<dyn BoardInteraction<'static> + Send + 'static>> {
|
||||
println!("Start v4");
|
||||
log::info!("Start v4");
|
||||
let mut awake = PinDriver::output(peripherals.gpio21.downgrade())?;
|
||||
awake.set_high()?;
|
||||
|
||||
@@ -163,7 +163,7 @@ pub(crate) fn create_v4(
|
||||
let mut sensor_expander = Pca9535Immediate::new(MutexDevice::new(&I2C_DRIVER), 34);
|
||||
let sensor = match sensor_expander.pin_into_output(GPIOBank::Bank0, 0) {
|
||||
Ok(_) => {
|
||||
println!("SensorExpander answered");
|
||||
log::info!("SensorExpander answered");
|
||||
//pulse counter version
|
||||
let mut signal_counter = PcntDriver::new(
|
||||
peripherals.pcnt0,
|
||||
@@ -200,7 +200,7 @@ pub(crate) fn create_v4(
|
||||
}
|
||||
}
|
||||
Err(_) => {
|
||||
println!("Can bus mode ");
|
||||
log::info!("Can bus mode ");
|
||||
let timing = can::config::Timing::B25K;
|
||||
let config = can::config::Config::new().timing(timing);
|
||||
let can = can::CanDriver::new(peripherals.can, peripherals.gpio0, peripherals.gpio2, &config).unwrap();
|
||||
@@ -211,7 +211,7 @@ pub(crate) fn create_v4(
|
||||
can.transmit(&tx_frame, 1000).unwrap();
|
||||
|
||||
if let Ok(rx_frame) = can.receive(1000) {
|
||||
println!("rx {:}:", rx_frame);
|
||||
log::info!("rx {:}:", rx_frame);
|
||||
}
|
||||
//can bus version
|
||||
SensorImpl::CanBus {
|
||||
@@ -274,7 +274,7 @@ pub(crate) fn create_v4(
|
||||
) {
|
||||
Ok(pump_ina) => Some(pump_ina),
|
||||
Err(err) => {
|
||||
println!("Error creating pump ina: {:?}", err);
|
||||
log::info!("Error creating pump ina: {:?}", err);
|
||||
None
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user