Hi!

It seems that nesC generates a temporary variable that has the same name 
"result" as the parameter variable. So the very quick way to correct it 
were to rename the parameter variable. It compiles, but I haven't now a 
MTS300 to try it.

----------------------------------

 From buid/micaz/app.c :

# 65 "/home/andrii/tinyos-2.x/tos/sensorboards/mts300/Mag.nc"
inline static error_t MagP$Mag$gainAdjustXDone(bool result){
#line 65
   unsigned char result;
#line 65

#line 65
   result = MagP$Mag$default$gainAdjustXDone(result);
#line 65

#line 65
   return result;
#line 65
}

----------------------------------

Interesting why...

Best regards,
Andrey



Nicola Wegner wrote:
> Now the confusion is perfect. I can compile my code without errors in my 
> cygwin environment. The error only occurs when I use Ubuntu. Both 
> installations are in sync with the cvs repository. But this probably 
> points to a configuration error of my Ubuntu setup, doesn't it?
> 
> 
> 2008/8/19 Nicola Wegner <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>>
> 
>     Hi,
> 
>     I use the MTS300 Sensorboard with micaz motes. I use the
>     Read-interface implementations from SensorMts300C.
> 
>     My wiring:
>     =======
>     components new SensorMts300C();
>     SensorReader0.Read -> SensorMts300C.Vref;
>     SensorReader1.Read -> SensorMts300C.Temp;
> 
>     By now I do not use the magnetic sensor (I want to do so later). But
>     I get a compile error that I don't understand from one of the TinyOS
>     Files:
> 
>     And the error
>     ==========
>     /opt/tinyos-2.x/tos/sensorboards/mts300/Mag.nc: In function
>     'MagP$Mag$gainAdjustXDone':
>     /opt/tinyos-2.x/tos/sensorboards/mts300/Mag.nc:65: error: 'result'
>     redeclared as different kind of symbol
>     /opt/tinyos-2.x/tos/sensorboards/mts300/Mag.nc:65: error: previous
>     definition of 'result' was here
>     /opt/tinyos-2.x/tos/sensorboards/mts300/Mag.nc: In function
>     'MagP$Mag$gainAdjustYDone':
>     /opt/tinyos-2.x/tos/sensorboards/mts300/Mag.nc:70: error: 'result'
>     redeclared as different kind of symbol
>     /opt/tinyos-2.x/tos/sensorboards/mts300/Mag.nc:70: error: previous
>     definition of 'result' was here
> 
>     The according lines in the interface Mag (Mag.nc) are:
> 
>     65:
>        event error_t gainAdjustXDone(bool result);
> 
>     70:
>       event error_t gainAdjustYDone(bool result);
> 
> 
>     I have no idea what could be wrong with them :( Any hints?
> 
>     Thanks Nicola
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to