она вам надо c autotools мучиться?
$ cat test.cpp
class A {
public:
A()
{
}
void bar()
{
}
};
void baz()
{
A foo();
foo.bar();
}
$ g++ -c test.cpp
test.cpp: In function ‘void baz()’:
test.cpp:16:6: error: request for member ‘bar’ in ‘foo’, which is of functional type ‘A()’
16 | foo.bar();
| ^~~
test.cpp:14:4: note: ‘A foo()’ is a function declaration, not a default-constructed object
14 | A foo();
| ^~~
int stled
два раза.void callback(char* topic, byte* payload, int new_pwm, unsigned int length) {
Serial.println();
Serial.print(topic); // выводим в сериал порт название топика
Serial.print(" => ");
for (int i = 0; i < length; i++) {
Serial.print((char)payload[i]);
} // выводим в сериал порт значение полученных данных
String strTopic = String(topic); //получаем название топика
if (strTopic == "home/kinozal/led") //проверяем из нужного ли топика пришли данные
{
payload[length] = 0; //чистим от мусора, длинна строки
String strPayload = String((char*)payload); //считываем значение топика
int val = strPayload.toInt(); //конвертируем для шим
int stled = map(val, 0, 100, 0, 255); //приводим значение 0-100 в значение 255-0
set_pwm_smooth(stled);
Serial.print(" => ");
}
}
не могу понять, почему не срабатывает
>make Makefile
Makefile
. Чтобы указать другой makefile его имя надо дать с ключом -f: make -f custom-makefile-name