s3lsensor / snowfort

SnowFort: An open source wireless sensor network for infrastructure and environmental monitoring
http://www.snowfort.org
Other
6 stars 8 forks source link

Undeclared variable #92

Closed consciousgaze closed 9 years ago

consciousgaze commented 9 years ago

The following error is reported during compilation. /home/user/snowflake/hello_world/../core/net/mac/tdmardc.c: In function ‘init’: /home/user/snowflake/hello_world/../core/net/mac/tdmardc.c:532:22: error: ‘RF_CHANNEL_CONST’ undeclared (first use in this function) /home/user/snowflake/hello_world/../core/net/mac/tdmardc.c:532:22: note: each undeclared identifier is reported only once for each function it appears in

yzliao commented 9 years ago

which branch was you in? development? -- I branched from developement

yzliao commented 9 years ago

also, could you post your project-conf.h file here?

consciousgaze commented 9 years ago

project_conf.h

ifndef PROJECT_CONF_H

define PROJECT_CONF_H

define NETSTACK_CONF_RDC tdmardc_driver

//TODO: change mac protocol to TDMA mac protocol -- yzliao

define NETSTACK_CONF_MAC nullmac_driver

define NETSTACK_CONF_FRAMER framer_tdma

// define sensor type

if (SN_ID == 0)

define SF_MOTE_TYPE_AP

endif /* SN_ID == 0: Access point/Base station*/

if (SN_ID > 0)

if (SN_ID == 10)

error "SN_ID cannot be 10" //ascii 10 is line break

endif

define SF_MOTE_TYPE_SENSOR

endif /* SN_ID >0: Sensor node*/

//define feature

define SF_FEATURE_SHELL_OPT

//redefine time accuracy

ifdef CLOCK_CONF_SECOND

undef CLOCK_CONF_SECOND

define CLOCK_CONF_SECOND 1024UL

else

define CLOCK_CONF_SECOND 1024UL

endif

endif /* PROJECT_CONF_H */

yzliao commented 9 years ago

you need to use the project-conf.h template in snwofort_example.