wellenvogel / esp32-nmea2000

nmea2000 gateway with ESP32
GNU General Public License v2.0
60 stars 23 forks source link

Multiple Capabilities per UserTask #12

Closed free-x closed 2 years ago

free-x commented 2 years ago

Hi @wellenvogel ,

i'm trying to declare multiple capabilities in one task. Without success

DECLARE_CAPABILITY(canunitbmp280,true);
DECLARE_CAPABILITY(oncemore,true);
lib/usercode/GwUserCode.cpp:36:70: error: redefinition of 'GwUserCapability __CAPname__'
 #define DECLARE_CAPABILITY(name,value) GwUserCapability __CAP##name__(#name,#value); 
                                                                      ^
lib/bmp280task/GwBMP280Task.h:16:1: note: in expansion of macro 'DECLARE_CAPABILITY'
 DECLARE_CAPABILITY(oncemore,true);
 ^
lib/usercode/GwUserCode.cpp:36:57: note: 'GwUserCapability __CAPname__' previously declared here
 #define DECLARE_CAPABILITY(name,value) GwUserCapability __CAP##name__(#name,#value); 
                                                         ^
lib/bmp280task/GwBMP280Task.h:15:1: note: in expansion of macro 'DECLARE_CAPABILITY'
 DECLARE_CAPABILITY(canunitbmp280,true);
 ^

greetings free-x

free-x commented 2 years ago

fixed.