switch to esp32c6
This commit is contained in:
@@ -5,7 +5,7 @@ use chrono_tz::{Europe::Berlin, Tz};
|
||||
|
||||
use esp_idf_hal::delay::Delay;
|
||||
use esp_idf_sys::{
|
||||
esp_deep_sleep, esp_ota_get_app_partition_count, esp_ota_get_running_partition, esp_ota_get_state_partition, esp_ota_img_states_t, esp_ota_img_states_t_ESP_OTA_IMG_ABORTED, esp_ota_img_states_t_ESP_OTA_IMG_INVALID, esp_ota_img_states_t_ESP_OTA_IMG_NEW, esp_ota_img_states_t_ESP_OTA_IMG_PENDING_VERIFY, esp_ota_img_states_t_ESP_OTA_IMG_UNDEFINED, esp_ota_img_states_t_ESP_OTA_IMG_VALID, esp_restart, gpio_deep_sleep_hold_dis, gpio_deep_sleep_hold_en, vTaskDelay, CONFIG_FREERTOS_HZ
|
||||
esp_deep_sleep, esp_ota_get_app_partition_count, esp_ota_get_running_partition, esp_ota_get_state_partition, esp_ota_img_states_t, esp_ota_img_states_t_ESP_OTA_IMG_ABORTED, esp_ota_img_states_t_ESP_OTA_IMG_INVALID, esp_ota_img_states_t_ESP_OTA_IMG_NEW, esp_ota_img_states_t_ESP_OTA_IMG_PENDING_VERIFY, esp_ota_img_states_t_ESP_OTA_IMG_UNDEFINED, esp_ota_img_states_t_ESP_OTA_IMG_VALID, esp_restart, vTaskDelay, CONFIG_FREERTOS_HZ
|
||||
};
|
||||
use log::error;
|
||||
use once_cell::sync::Lazy;
|
||||
@@ -525,10 +525,6 @@ fn safe_main() -> anyhow::Result<()> {
|
||||
};
|
||||
}
|
||||
|
||||
//relatch
|
||||
unsafe { gpio_deep_sleep_hold_dis() };
|
||||
unsafe { gpio_deep_sleep_hold_en() };
|
||||
|
||||
let deep_sleep_duration_minutes: u32 = if state_of_charge < 10 {
|
||||
if online_mode == OnlineMode::Online {
|
||||
let _ = board.mqtt_publish(
|
||||
|
||||
Reference in New Issue
Block a user