Merge branch 'feature/12v' of github.com:0110/PlantCtrl into feature/12v

# Conflicts:
#	rust/Cargo.toml
This commit is contained in:
Empire 2023-11-30 19:26:03 +01:00
commit 4a8fffb3cc
4 changed files with 21 additions and 14 deletions

View File

@ -8,19 +8,25 @@ rust-version = "1.71"
[profile.release]
# Explicitly disable LTO which the Xtensa codegen backend has issues
lto = "thin"
#lto = "thin"
opt-level = "s"
strip = false
codegen-units = 1
debug = true
#codegen-units = 1
debug = true
overflow-checks = true
panic = "unwind"
incremental = true
[profile.dev]
# Explicitly disable LTO which the Xtensa codegen backend has issues
lto = "thin"
debug = true # Symbols are nice and they don't increase the size on Flash
#lto = "thin"
opt-level = "s"
strip = false
codegen-units = 1
#codegen-units = 1
debug = true
overflow-checks = true
panic = "unwind"
incremental = true
[package.metadata.cargo_runner]
# The string `$TARGET_FILE` will be replaced with the path from cargo.
@ -60,15 +66,16 @@ esp-idf-hal = "0.42.5"
esp-idf-sys = { version = "0.33.7", features = ["binstart", "native"] }
esp-ota = "0.2.0"
esp_idf_build = "0.1.3"
build-time = "0.1.2"
chrono = { version = "0.4.23", default-features = false , features = ["iana-time-zone"] }
chrono-tz = {version="0.8.0", default-features = false , features = [ "filter-by-regex" ]}
embedded-hal = "0.2.7"
shift-register-driver = "0.1.1"
one-wire-bus = "0.1.1"
anyhow = { version = "1.0.75", features = ["std", "backtrace"] }
schemars = "0.8.16"
heapless = { version = "0.8.0", features = ["serde"] }
#?bq34z100 required
[build-dependencies]
embuild = "0.31.3"
vergen = { version = "8.2.6", features = ["build", "git", "gitcl"] }

View File

@ -1,3 +1,5 @@
use vergen::EmitBuilder;
fn main() {
embuild::espidf::sysenv::output();
}
let _ = EmitBuilder::builder().all_git().emit();
}

View File

@ -1,5 +1,4 @@
use chrono::{Datelike, Timelike, NaiveDateTime};
use build_time::build_time_utc;
use chrono_tz::Europe::Berlin;
use esp_idf_hal::delay::Delay;
@ -23,8 +22,8 @@ fn main() -> Result<()>{
log::info!("Startup Rust");
let utc_build_time = build_time_utc!();
println!("Version was build {}", utc_build_time);
let git_hash = env!("VERGEN_GIT_DESCRIBE");
println!("Version useing git has {}", git_hash);
let mut board = PlantHal::create()?;

View File

@ -1,6 +1,5 @@
//offer ota and config mode
use build_time::build_time_utc;
use embedded_svc::http::Method;
use esp_idf_svc::http::server::EspHttpServer;
use esp_ota::OtaUpdate;
@ -20,9 +19,9 @@ pub fn httpd(initial_config:bool) -> EspHttpServer<'static> {
return Ok(())
}).unwrap();
server
.fn_handler("/buildtime",Method::Get, |request| {
.fn_handler("/version",Method::Get, |request| {
let mut response = request.into_ok_response()?;
response.write(build_time_utc!().as_bytes())?;
response.write(env!("VERGEN_GIT_DESCRIBE").as_bytes())?;
return Ok(())
}).unwrap();
server