cleanup
This commit is contained in:
parent
dd91973f9b
commit
e2d00bc939
@ -4,17 +4,10 @@ target = "riscv32imac-esp-espidf"
|
|||||||
|
|
||||||
[target.riscv32imac-esp-espidf]
|
[target.riscv32imac-esp-espidf]
|
||||||
linker = "ldproxy"
|
linker = "ldproxy"
|
||||||
#runner = "espflash flash --monitor --partition-table partitions.csv" # Select this runner for espflash v2.x.x
|
# runner = "espflash flash --monitor --partition-table partitions.csv -b no-reset" # Select this runner for espflash v2.x.x
|
||||||
|
runner = "espflash flash --monitor --baud 921600 --partition-table partitions.csv -b no-reset" # Select this runner for espflash v2.x.x
|
||||||
# runner = espflash erase-parts otadata
|
# runner = espflash erase-parts otadata
|
||||||
runner = "espflash flash --monitor --baud 921600 --partition-table partitions.csv" # Select this runner for espflash v2.x.x
|
|
||||||
# runner = "cargo runner"
|
|
||||||
rustflags = [ "--cfg", "espidf_time64"] # Extending time_t for ESP IDF 5: https://github.com/esp-rs/rust/issues/110
|
|
||||||
|
|
||||||
[target.xtensa-esp32-espidf]
|
|
||||||
linker = "ldproxy"
|
|
||||||
#runner = "espflash flash --monitor --partition-table partitions.csv" # Select this runner for espflash v2.x.x
|
|
||||||
# runner = espflash erase-parts otadata
|
|
||||||
runner = "espflash flash --monitor --baud 921600 --partition-table partitions.csv" # Select this runner for espflash v2.x.x
|
|
||||||
# runner = "cargo runner"
|
# runner = "cargo runner"
|
||||||
rustflags = [ "--cfg", "espidf_time64"] # Extending time_t for ESP IDF 5: https://github.com/esp-rs/rust/issues/110
|
rustflags = [ "--cfg", "espidf_time64"] # Extending time_t for ESP IDF 5: https://github.com/esp-rs/rust/issues/110
|
||||||
|
|
||||||
|
@ -386,7 +386,10 @@ fn safe_main() -> anyhow::Result<()> {
|
|||||||
&mut board,
|
&mut board,
|
||||||
);
|
);
|
||||||
|
|
||||||
if STAY_ALIVE.load(std::sync::atomic::Ordering::Relaxed) {
|
|
||||||
|
let stay_alive = STAY_ALIVE.load(std::sync::atomic::Ordering::Relaxed);
|
||||||
|
println!("Check stay alive, current state is {}", stay_alive);
|
||||||
|
if stay_alive {
|
||||||
drop(board);
|
drop(board);
|
||||||
let reboot_now = Arc::new(AtomicBool::new(false));
|
let reboot_now = Arc::new(AtomicBool::new(false));
|
||||||
let _webserver = httpd(reboot_now.clone());
|
let _webserver = httpd(reboot_now.clone());
|
||||||
|
@ -651,7 +651,6 @@ impl PlantCtrlBoardInteraction for PlantCtrlBoard<'_> {
|
|||||||
let mut client =
|
let mut client =
|
||||||
EspMqttClient::new_cb(&config.mqtt_url, &mqtt_client_config, move |event| {
|
EspMqttClient::new_cb(&config.mqtt_url, &mqtt_client_config, move |event| {
|
||||||
let payload = event.payload();
|
let payload = event.payload();
|
||||||
println!("received mqtt event {:?}", payload);
|
|
||||||
match payload {
|
match payload {
|
||||||
embedded_svc::mqtt::client::EventPayload::Received {
|
embedded_svc::mqtt::client::EventPayload::Received {
|
||||||
id: _,
|
id: _,
|
||||||
@ -968,9 +967,6 @@ impl CreatePlantHal<'_> for PlantHal {
|
|||||||
esp!(unsafe { esp_idf_sys::i2c_get_timeout(i2c_port, &mut timeout)}).unwrap();
|
esp!(unsafe { esp_idf_sys::i2c_get_timeout(i2c_port, &mut timeout)}).unwrap();
|
||||||
println!("init i2c timeout is {}", timeout);
|
println!("init i2c timeout is {}", timeout);
|
||||||
|
|
||||||
loop {
|
|
||||||
unsafe { vTaskDelay(1) }
|
|
||||||
}
|
|
||||||
//esp!(unsafe { esp_idf_sys::i2c_set_timeout(i2c_port, 22)}).unwrap();
|
//esp!(unsafe { esp_idf_sys::i2c_set_timeout(i2c_port, 22)}).unwrap();
|
||||||
|
|
||||||
let mut battery_driver: Bq34z100g1Driver<I2cDriver, Delay> = Bq34z100g1Driver {
|
let mut battery_driver: Bq34z100g1Driver<I2cDriver, Delay> = Bq34z100g1Driver {
|
||||||
|
Loading…
Reference in New Issue
Block a user