Merge branch 'feature/12v' of github.com:0110/PlantCtrl into feature/12v
# Conflicts: # rust/Cargo.toml
This commit is contained in:
commit
4a8fffb3cc
@ -8,19 +8,25 @@ rust-version = "1.71"
|
|||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
# Explicitly disable LTO which the Xtensa codegen backend has issues
|
# Explicitly disable LTO which the Xtensa codegen backend has issues
|
||||||
lto = "thin"
|
#lto = "thin"
|
||||||
opt-level = "s"
|
opt-level = "s"
|
||||||
strip = false
|
strip = false
|
||||||
codegen-units = 1
|
#codegen-units = 1
|
||||||
debug = true
|
debug = true
|
||||||
|
overflow-checks = true
|
||||||
|
panic = "unwind"
|
||||||
|
incremental = true
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
# Explicitly disable LTO which the Xtensa codegen backend has issues
|
# Explicitly disable LTO which the Xtensa codegen backend has issues
|
||||||
lto = "thin"
|
#lto = "thin"
|
||||||
debug = true # Symbols are nice and they don't increase the size on Flash
|
|
||||||
opt-level = "s"
|
opt-level = "s"
|
||||||
strip = false
|
strip = false
|
||||||
codegen-units = 1
|
#codegen-units = 1
|
||||||
|
debug = true
|
||||||
|
overflow-checks = true
|
||||||
|
panic = "unwind"
|
||||||
|
incremental = true
|
||||||
|
|
||||||
[package.metadata.cargo_runner]
|
[package.metadata.cargo_runner]
|
||||||
# The string `$TARGET_FILE` will be replaced with the path from cargo.
|
# 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-idf-sys = { version = "0.33.7", features = ["binstart", "native"] }
|
||||||
esp-ota = "0.2.0"
|
esp-ota = "0.2.0"
|
||||||
esp_idf_build = "0.1.3"
|
esp_idf_build = "0.1.3"
|
||||||
build-time = "0.1.2"
|
|
||||||
chrono = { version = "0.4.23", default-features = false , features = ["iana-time-zone"] }
|
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" ]}
|
chrono-tz = {version="0.8.0", default-features = false , features = [ "filter-by-regex" ]}
|
||||||
embedded-hal = "0.2.7"
|
embedded-hal = "0.2.7"
|
||||||
shift-register-driver = "0.1.1"
|
shift-register-driver = "0.1.1"
|
||||||
one-wire-bus = "0.1.1"
|
one-wire-bus = "0.1.1"
|
||||||
anyhow = { version = "1.0.75", features = ["std", "backtrace"] }
|
anyhow = { version = "1.0.75", features = ["std", "backtrace"] }
|
||||||
|
schemars = "0.8.16"
|
||||||
heapless = { version = "0.8.0", features = ["serde"] }
|
heapless = { version = "0.8.0", features = ["serde"] }
|
||||||
#?bq34z100 required
|
#?bq34z100 required
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
embuild = "0.31.3"
|
embuild = "0.31.3"
|
||||||
|
vergen = { version = "8.2.6", features = ["build", "git", "gitcl"] }
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
use vergen::EmitBuilder;
|
||||||
fn main() {
|
fn main() {
|
||||||
embuild::espidf::sysenv::output();
|
embuild::espidf::sysenv::output();
|
||||||
|
let _ = EmitBuilder::builder().all_git().emit();
|
||||||
}
|
}
|
@ -1,5 +1,4 @@
|
|||||||
use chrono::{Datelike, Timelike, NaiveDateTime};
|
use chrono::{Datelike, Timelike, NaiveDateTime};
|
||||||
use build_time::build_time_utc;
|
|
||||||
|
|
||||||
use chrono_tz::Europe::Berlin;
|
use chrono_tz::Europe::Berlin;
|
||||||
use esp_idf_hal::delay::Delay;
|
use esp_idf_hal::delay::Delay;
|
||||||
@ -23,8 +22,8 @@ fn main() -> Result<()>{
|
|||||||
|
|
||||||
log::info!("Startup Rust");
|
log::info!("Startup Rust");
|
||||||
|
|
||||||
let utc_build_time = build_time_utc!();
|
let git_hash = env!("VERGEN_GIT_DESCRIBE");
|
||||||
println!("Version was build {}", utc_build_time);
|
println!("Version useing git has {}", git_hash);
|
||||||
|
|
||||||
|
|
||||||
let mut board = PlantHal::create()?;
|
let mut board = PlantHal::create()?;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
//offer ota and config mode
|
//offer ota and config mode
|
||||||
|
|
||||||
use build_time::build_time_utc;
|
|
||||||
use embedded_svc::http::Method;
|
use embedded_svc::http::Method;
|
||||||
use esp_idf_svc::http::server::EspHttpServer;
|
use esp_idf_svc::http::server::EspHttpServer;
|
||||||
use esp_ota::OtaUpdate;
|
use esp_ota::OtaUpdate;
|
||||||
@ -20,9 +19,9 @@ pub fn httpd(initial_config:bool) -> EspHttpServer<'static> {
|
|||||||
return Ok(())
|
return Ok(())
|
||||||
}).unwrap();
|
}).unwrap();
|
||||||
server
|
server
|
||||||
.fn_handler("/buildtime",Method::Get, |request| {
|
.fn_handler("/version",Method::Get, |request| {
|
||||||
let mut response = request.into_ok_response()?;
|
let mut response = request.into_ok_response()?;
|
||||||
response.write(build_time_utc!().as_bytes())?;
|
response.write(env!("VERGEN_GIT_DESCRIBE").as_bytes())?;
|
||||||
return Ok(())
|
return Ok(())
|
||||||
}).unwrap();
|
}).unwrap();
|
||||||
server
|
server
|
||||||
|
Loading…
Reference in New Issue
Block a user