esp-hal release wip

This commit is contained in:
2025-10-31 23:22:40 +01:00
parent 8b0734d029
commit f366aace7f
8 changed files with 140 additions and 160 deletions

View File

@@ -14,7 +14,7 @@ use unit_enum::UnitEnum;
const LOG_ARRAY_SIZE: u8 = 220;
const MAX_LOG_ARRAY_INDEX: u8 = LOG_ARRAY_SIZE - 1;
#[esp_hal::ram(rtc_fast, persistent)]
#[esp_hal::ram(unstable(rtc_fast), unstable(persistent))]
static mut LOG_ARRAY: LogArray = LogArray {
buffer: [LogEntryInner {
timestamp: 0,
@@ -159,7 +159,6 @@ impl LogArray {
}
}
fn limit_length<const LIMIT: usize>(input: &str, target: &mut heapless::String<LIMIT>) {
for char in input.chars() {
match target.push(char) {
@@ -171,16 +170,20 @@ fn limit_length<const LIMIT: usize>(input: &str, target: &mut heapless::String<L
target.pop();
}
//add .. to shortened strings
match target.push('.'){
match target.push('.') {
Ok(_) => {}
Err(_) => {
warn!("Error pushin . to limit {LIMIT} current value {target} input {input}")
warn!(
"Error pushin . to limit {LIMIT} current value {target} input {input}"
)
}
}
match target.push('.'){
match target.push('.') {
Ok(_) => {}
Err(_) => {
warn!("Error pushin . to limit {LIMIT} current value {target} input {input}")
warn!(
"Error pushin . to limit {LIMIT} current value {target} input {input}"
)
}
}
return;