Author Topic: errors in TPA81 initialization code in Webbtolib  (Read 1474 times)

0 Members and 1 Guest are viewing this topic.

Offline teoxanTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 2
errors in TPA81 initialization code in Webbtolib
« on: May 31, 2010, 12:39:08 AM »

Hi,

I got two errors when initializing the TPA81 in the new Webbotlib.

"../Servos.c:31: error: extra brace group at end of initializer

../Servos.c:31: error: (near initialization for 'tpa.temperature')


below is the part of code I got these errors.

Code: [Select]
#include "C:\My_Robot\WebbotLib\Sensors\Temperature\Devantech\TPA81.h"
Devantech_TPA81 tpa=MAKE_Devantech_TPA81();
Any help would be much appreciated.

Thanks


Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 108
Re: errors in TPA81 initialization code in Webbtolib
« Reply #1 on: May 31, 2010, 06:19:07 PM »
Thanks for the 'heads up'.
To fix your problem: then write the code in the same way as Project Designer does ie specifying the default I2C address:
Code: [Select]
Devantech_TPA81 temperature = MAKE_Devantech_TPA81_At(0xD0);
And the problem should go away.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline teoxanTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 2
Re: errors in TPA81 initialization code in Webbtolib
« Reply #2 on: June 01, 2010, 01:01:58 PM »


ok,

I'll try it and let you know.

Thanks!


 


Get Your Ad Here