Support Board
Date/Time: Mon, 15 Dec 2025 05:20:18 +0000
Post From: Need help with ACSIL logic
| [2019-07-20 18:47:03] |
| User907968 - Posts: 859 |
|
The number you have declared as "unsigned int" are simply used to identify the base data array source, they have no effect on the actual data. In the else block as it is now, you are performing the same calculation in both cases (Up - Down), swap the second block as shown below. if (sc.BaseDataIn[Up][sc.Index] > sc.BaseDataIn[Down][sc.Index]) { sc.Subgraph[0][sc.Index] = (sc.BaseDataIn[Up][sc.Index] - sc.BaseDataIn[Down][sc.Index]); sc.Subgraph[0].DataColor[sc.Index] = sc.Subgraph[0].PrimaryColor; } else { sc.Subgraph[0][sc.Index] = (sc.BaseDataIn[Down][sc.Index] - sc.BaseDataIn[Up][sc.Index]); sc.Subgraph[0].DataColor[sc.Index] = sc.Subgraph[0].SecondaryColor; } |
