#59 Cannot see struct member from task

compiler
closed-works-for-me
NXC (53)
5
2014-12-15
2009-01-16
Luna Kid
No

struct RADAR_t
{
radar_map_entry radar_map[];
unsigned short map_size;

bool scanning; //\!\! This is not properly accessed from the tasks?\! :-o

};

RADAR_t radar;

bool radar_scanning = 0; // this *is* seen from tasks (unlike the struct member above)

...

task task1()
{
radar.reading = 1; //!! NEVER MADE A DIFFERENCE... :(
radar_reading = 1; // OK
...
}

task task2()
{
while (1)
{
//!! if (radar.reading) //!! NEVER OCCURED... :(
if (radar_reading) // OK
{
// Do stuff...
...

Discussion

  • Luna Kid

    Luna Kid - 2009-01-16

    Dammit, I made a copy-paste error in the problem-report: started replacing "reading" to "scanning" but failed to replace all... So, of course, all instances of "reading" should be "scanning" in the example above. Sorry!

     
  • John Hansen

    John Hansen - 2009-11-23
    • status: open --> closed-works-for-me
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks