Custom Component bug?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
nils
Posts: 33
Joined: Fri Nov 02, 2007 11:03 am

Custom Component bug?

Post by nils »

Hello

This weekend I played around wit the Custom Component and the Custom_Code.c you provide. So I tried to use the Funct3 that returns the sum of 2 values:

Code: Select all

char Funct3(char nPara1, char nPara2)
{
/*Macro_Funct3_Start*/

	return (nPara1 + nPara2);

/*Macro_Funct3_End*/
}
It seemed pretty easy, so I set up a flowchart with a Component Macro that calls the function Funct3 with 2 given values and stored the return value in a variable. To "see" what was calculated, I took an LED array and put in the SUM. And now it is getting confusing: as long as I simulated at no time was the calculation right. e.g. 1+1 = 2 but in the simulation it was 4 or 92 and I had no clue why it did so. As soon as I programmed the real Atmega32 it worked, so I assume this is / may be a bug in Flowcode OR the Custom Component is not finally implemented. Or did I miss something?

Regards
Nils

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Post by Steve »

This is normal - Flowcode does not simulate a user's own C code. Any C code inserted via the C icon, the "supplementary code" window or the Custom Component will not simulate.

nils
Posts: 33
Joined: Fri Nov 02, 2007 11:03 am

Post by nils »

ok :) I did not know before, thanks

Post Reply