FTDI Community

General Category => Discussion - Software => Topic started by: sanjuro on August 24, 2018, 09:56:59 AM

Title: EVE Designer 4 - ESD function with Theme as Return Value
Post by: sanjuro on August 24, 2018, 09:56:59 AM
I want to create a ESD function, that returns a Theme:

#include "FT_DataTypes.h"
#include "Ft_Esd_Theme.h"

ESD_FUNCTION(Set_Connection_Color, Type = Ft_Esd_Theme *,Buffered)
Ft_Esd_Theme *Set_Connection_color()
{
   
   if(!Device_online)
      temp.TextColor=0xff0000;
   else
      temp.TextColor=0x00ff00;
   return &temp;
}


The Textcolor should be green or red, depending on the state of the variable "Device_Online"
The function is shown correctly in the "User functions" and i can add it into the Logic Node Editor.

After saving and compiling i get the error "tcc: error: undefined symbol 'Set_Connection_Color'"
but i canĀ“t find, where the problem is. The Logic Node editor shows everything correctly (Screenshot attached).