Skip to content

Commit

Permalink
Change default log level to info
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiojmendes committed Aug 28, 2024
1 parent f2609e0 commit 509b23c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ runner = "probe-rs run --chip nRF52840_xxAA"
target = "thumbv7em-none-eabihf"

[env]
DEFMT_LOG = "info"
DEFMT_LOG = "debug"
2 changes: 1 addition & 1 deletion .github/workflows/rust_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

- name: Run build command
env:
DEFMT_LOG: warn
DEFMT_LOG: info
run: cargo build --release

- name: Package
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "tempsys-firmware"
version = "0.1.4"
version = "0.1.5"
authors = ["Fabio Mendes <[email protected]>"]
resolver = "2"

Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ async fn main(spawner: Spawner) {
loop {
// ADC
let voltage = voltage::read(&mut saadc).await;
defmt::info!("Voltage: {}", voltage);
defmt::debug!("Voltage: {}", voltage);

defmt::info!("Start advertising {}", counter);
defmt::debug!("Start advertising {}", counter);
let adv_fut = advertise(sd, counter, voltage, temperature);
pin_mut!(adv_fut);
let temp_fut = temperature::read();
Expand Down
4 changes: 2 additions & 2 deletions src/temperature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub async fn init(mut twi: Twim<'static, impl twim::Instance>) -> ! {
}

async fn setup_temp_reader(twi: &mut Twim<'_, impl twim::Instance>) -> Result<(), twim::Error> {
defmt::info!("Set resolution");
defmt::debug!("Set resolution");
twi.write(MCP9808_ADDRESS, &[0x08, 0x00]).await?;
Ok(())
}
Expand All @@ -55,7 +55,7 @@ async fn read_temperature(twi: &mut Twim<'_, impl twim::Instance>) -> Result<i16
let [upper, lower] = buf;
let temp_raw = signed_12bit(upper, lower);
let temperature = (temp_raw as f32 / 16.0 * 100.0) as i16;
defmt::info!(
defmt::debug!(
"Temperature: {} (upper: {:#02x}, lower: {:#02x})",
temperature,
upper,
Expand Down

0 comments on commit 509b23c

Please sign in to comment.