Code Monkey home page Code Monkey logo

rlog's Issues

? вместо числа float

Столкнулся со странной проблемой. Никак не хочет библиотека показывать число типа float.
Переменная “a” несколько раз преобразуется по ходу вычислений. Вывожу лог:
rlog_d(“func()”, “1 a = %f”, a);
Serial.print(“1 a = “);Serial.println(a);

00:00:00 [D] func() :: 1 a = ?
1 a = 9108906.00
00:00:00 [D] func() :: 2 a = ?
2 a = -9.00
00:00:00 [D] func() :: 3 a = ?
3 a = -0.09
Arduino IDE 1.8.19, плата Arduino Nano (Atmega 328p)

C:/PlatformIO/libs/system/rLog/src/rLog.cpp:37:8: error: ‘xSemaphoreHandle’ does not name a type;

C:/PlatformIO/libs/system/rLog/src/rLog.cpp:37:8: error: ‘xSemaphoreHandle’ does not name a type; did you mean ‘SemaphoreHandle_t’?
37 | static xSemaphoreHandle _rlog_mutex;
| ^~~~~~~~~~~~~~~~
| SemaphoreHandle_t

Нашёл, что xSemaphoreHandle определяется в файле FreeRTOS.h, которй включатся в строке 34 файла rLog.cpp
/* FreeRTOS enabled */

#include “freertos/FreeRTOS.h”
#include “freertos/semphr.h”

static xSemaphoreHandle _rlog_mutex;

void _rlog_lock()

Но, если открыть файл FreeRTOS.h, то определение xSemaphoreHandle влючается по условию, а configENABLE_BACKWARD_COMPATIBILITY = 0 во время компиляции:

#if configENABLE_BACKWARD_COMPATIBILITY == 1
#define eTaskStateGet eTaskGetState
#define portTickType TickType_t
#define xTaskHandle TaskHandle_t
#define xQueueHandle QueueHandle_t
#define xSemaphoreHandle SemaphoreHandle_t

Подскажите, что и где надо поправить?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.