Заметки электроника
Простое - надёжнее!
Меню
  • Главная
  • Погода
  • Заметки
  • Календарь
  • Фотогалерея
  • Песни
  • Чтиво
  • Программы
  • Скачать
  • Связь и ссылки
  • Чехия
  • Lavka

Живёшь в Чехии?

Repository of CC0-1.0 Licensed Music

  • Печать
  • E-mail
Информация о материале
Автор: Super User
Родительская категория: Заметки
Категория: Компьютерная повседневность
Создано: 01 августа 2024
Обновлено: 01 августа 2024
Просмотров: 765
Звезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активна
Коллекция музыки под лицензией public-domain/CC0-1.0 из разных мест в интернете. В настоящее время содержит около ~7000 песен и ~40 гб музыки.
https://github.com/SoundSafari/CC0-1.0-Music

Sci-Fi to watch

  • Печать
  • E-mail
Информация о материале
Автор: Super User
Родительская категория: Заметки
Категория: Жизнь
Создано: 25 июля 2024
Обновлено: 25 июля 2024
Просмотров: 752
Звезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активна
 

2001: a space odyssey

Brazil (a personal favorite of mine)

Arrival

Blade runner (both)

Ex machina

Alien

Everything Everywhere All at Once

Wrath of Khan

But personally I think that tv is where the best and most creative sci-fi is happening laley like:

Tales from the loop

BSG

Westworld

The expanse

Humans

Foundation

Black Mirror

Station 11

Severance

Raised by wolves

Building a sub 250g Autonomous Drone with Ardupilot and ExpressLRS AirPort Telemetry

  • Печать
  • E-mail
Информация о материале
Автор: Super User
Родительская категория: Заметки
Категория: Моделирование
Создано: 21 июля 2024
Обновлено: 21 июля 2024
Просмотров: 944
Звезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активна

GIT rebase: deleting old commit

  • Печать
  • E-mail
Информация о материале
Автор: Super User
Родительская категория: Заметки
Категория: Компьютерная повседневность
Создано: 10 июля 2024
Обновлено: 10 июля 2024
Просмотров: 817
Звезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активна
> git log --pretty=oneline --abbrev-commit
e2d9e1a (HEAD -> main, origin/main, origin/HEAD) Readme fix
bb0d404 init
6a5fc28 Initial commit
Next:
git rebase -i HEAD


Press:
Esc followed by  :wq to safe




 

Enhanced Precision with 10-Digit Input for parseFloat Function for MCUs

  • Печать
  • E-mail
Информация о материале
Автор: Super User
Родительская категория: Заметки
Категория: Программирование микроконтроллеров
Создано: 25 июня 2024
Обновлено: 25 июня 2024
Просмотров: 866
Звезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активна

New Feature Update: Enhanced Precision with 10-Digit Input for parseFloat Function

The parseFloat function has been updated to handle up to 10 input digits. This enhancement ensures greater precision and flexibility in converting numeric strings to floating-point values, meeting the demands of more complex and extensive data processing tasks.

Key Improvements

1. Increased Input Range:

The function now accepts up to 10 numeric digits, a considerable upgrade from the previous limit of 6 digits. This increase allows for the conversion of larger numbers and supports applications requiring higher precision.

2. Robust Error Handling:

The updated function includes comprehensive error checking to ensure only valid numeric characters are processed. This prevents incorrect results caused by non-numeric characters in the input buffer.

3. Enhanced Flexibility:

With the capability to handle longer numeric strings, users can now input larger numbers without losing accuracy. This is particularly beneficial for financial calculations, scientific measurements, and other precision-critical applications.

Detailed Function Analysis

Here’s a closer look at the updated parseFloat function:

float parseFloat(uint8_t *buff, int symbols) {
    // Ensure symbols is within the allowed range
    if (symbols < 1 || symbols > 10) {
        return 0.0; // or handle error appropriately
    }

    int64_t voltage = 0;
    float mul = 1.0;
    const uint32_t mulArr[11] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000};

    if (*buff == 0x2D) { // Check for negative sign
        mul = -1.0;
        buff++;
        symbols--;
    }

    while (symbols--) {
        if (*buff < 0x30 || *buff > 0x39) { // Check for numeric characters
            return 0.0; // or handle error appropriately
        }
        voltage += (*buff++ - 0x30) * mulArr[symbols];
    }

    return mul * (float)voltage / 100.0;
}

How It Works

1. Parameter Validation:

The function begins by verifying that the number of symbols is within the acceptable range (1 to 10). If not, it returns 0.0, indicating an error.

2. Negative Number Handling:

If the first character in the buffer is a minus sign (0x2D in ASCII), the function sets the multiplier mul to -1.0 to account for the negative value and moves the buffer pointer to the next character.

3. Character Conversion and Accumulation:

The function then processes each character in the buffer, ensuring they are numeric digits (ASCII values between 0x30 and 0x39).

It converts each character to its corresponding integer value, multiplies it by the appropriate factor from mulArr, and accumulates the result in voltage.

4. Final Calculation:

After processing all characters, the function returns the result as a floating-point number. The voltage is divided by 100.0 to adjust the decimal place, and it is multiplied by mul to handle any negative sign.

Benefits of the Update

  • Higher Precision: With support for up to 10 digits, the function can now handle significantly larger numbers and more precise calculations.
  • Error Resilience: The added checks for valid numeric characters ensure robust and accurate conversions, minimizing the risk of errors.
  • Versatility: This enhancement makes the function suitable for a broader range of applications, from financial software to scientific research.

This update significantly enhances the usability and reliability of the parseFloat function. We look forward to seeing how our users leverage this new capability to achieve even greater precision and performance in their applications. As always, we welcome your feedback and suggestions for further improvements.

  1. ANTIRTOS v0.1.3 Released: Introducing Delayed Function Execution Make It Super Easy And Fast
  2. Пара слайдеров на чистом HTML + Vanilla JS без использования input type = slider
  3. Combining E24 resistors to get best match in gain of inverting and non-inverting amplifiers: python
  4. kolecka do sprhy

Страница 22 из 197

  • 17
  • 18
  • 19
  • ...
  • 21
  • 22
  • 23
  • 24
  • ...
  • 26

Back to Top

© 2026 Заметки электроника

Top.Mail.Ru