|
Page 1 of 1
|
[ 8 posts ] |
|
**Error**:Calling procedure 'sendI2CMsg' - with ROBOTC 3.51
Author |
Message |
JamieD
Rookie
Joined: Fri Mar 11, 2011 9:30 pm Posts: 12
|
 **Error**:Calling procedure 'sendI2CMsg' - with ROBOTC 3.51
With the upgrade to ROBOTC 3.51 we're now getting the following error. It's coming out of common.h, from the 3rdPartyDrivers version 2.8 when common.h is pulled in via: #include "drivers/HTSMUX-driver.h" #include "drivers/HTANG-driver.h"
**Error**:Calling procedure 'sendI2CMsg'. '*' Indirection levels mismatch. Parameter: 'unsigned const char * pSendMsg'. Expression: 'error_array[0]'. Type: 'ubyte' **Error**:Calling procedure 'sendI2CMsg'. '*' Indirection levels mismatch. Parameter: 'unsigned const char * pSendMsg'. Expression: 'data[0]'. Type: 'tByteArray &' **Error**:Calling procedure 'sendI2CMsg'. '*' Indirection levels mismatch. Parameter: 'unsigned const char * pSendMsg'. Expression: 'data[0]'. Type: 'tByteArray &' **Error**:Calling procedure 'readI2CReply'. '*' Indirection levels mismatch. Parameter: 'unsigned char * pReplyBytes'. Expression: 'data[0]'. Type: 'tByteArray &'
I believe this will get fixed with Xander's rewrite to 3.x of his driver suite. Is there a reasonable way to get past this fixing it in common.h of 3rdPartyDriverSuite 2.8 in the meantime? I would like to both fix, and make an effort to understand what's going on here.
Best Regards, Jamie Diamond
_________________Jamie Diamond Cougar Robotics Team (Ring It Up!, Bowled Over!, Get Over It! #4251) (Smart Moves #127, Climate Connections #437, Power Puzzle #1470) coach@cougarrobot.comhttp://www.cougarrobot.comhttps://www.facebook.com/CougarRoboticsTeam
|
Sun Sep 23, 2012 12:37 am |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: **Error**:Calling procedure 'sendI2CMsg' - with ROBOTC 3
There's probably a way to get rid of the errors/warnings but I don't know if that'll make it work  replace arrayname[0] for every call to sendI2CMsg with &arrayname[0]This may or may not work, I have no idea and I have no way of testing that since I am about 700km away from my NXTs right now  - Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Sun Sep 23, 2012 1:18 am |
|
 |
didiercoll
Novice
Joined: Sat Sep 15, 2012 11:28 am Posts: 68
|
 Re: **Error**:Calling procedure 'sendI2CMsg' - with ROBOTC 3
* common.h provides a number of frequently used functions that are useful for writing * drivers.
File: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ROBOTC\rdpartyrobotcdr-v2.8\drivers\common.h
#include "firmwareVersion.h"
Hello
I have same problems as Jamied with
HTGYRO-driver.h provides an API for the HiTechnic Gyroscopic Sensor.
which call common.h
but it call
firmwareVersion.h
which nis not in my files in the computer ..... ????
and it seems to be a very important file ?
was working last sunday .
perhaps are you working on firmwareVersion.h? and it will come back later ?
didier
|
Sun Sep 23, 2012 3:13 am |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: **Error**:Calling procedure 'sendI2CMsg' - with ROBOTC 3
Here is how I fixed common.h. Basically change in four places adding '&' in front of the array name (like what Xander said).  |  |  |  | Code: 1.1 --- a/RobotCDrivers/drivers/common.h Sun Aug 26 09:55:31 2012 -0700 1.2 +++ b/RobotCDrivers/drivers/common.h Wed Sep 19 05:09:27 2012 -0700 1.3 @@ -162,7 +162,7 @@ 1.4 #endif // __COMMON_H_DEBUG__ 1.5 1.6 for (int i = 0; i < 5; i++) { 1.7 - sendI2CMsg(link, error_array[0], 0); 1.8 + sendI2CMsg(link, &error_array[0], 0); 1.9 wait1Msec(5); 1.10 } 1.11 } 1.12 @@ -246,11 +246,11 @@ 1.13 return false; 1.14 } 1.15 1.16 - sendI2CMsg(link, data[0], replylen); 1.17 + sendI2CMsg(link, &data[0], replylen); 1.18 1.19 if (!waitForI2CBus(link)) { 1.20 clearI2CError(link, data[1]); 1.21 - sendI2CMsg(link, data[0], replylen); 1.22 + sendI2CMsg(link, &data[0], replylen); 1.23 if (!waitForI2CBus(link)) 1.24 return false; 1.25 } 1.26 @@ -300,7 +300,7 @@ 1.27 return false; 1.28 1.29 // ask for the input to put into the data array 1.30 - readI2CReply(link, data[0], replylen); 1.31 + readI2CReply(link, &data[0], replylen); 1.32 1.33 return true; 1.34 }
|  |  |  |  |
|
Sun Sep 23, 2012 3:24 am |
|
 |
didiercoll
Novice
Joined: Sat Sep 15, 2012 11:28 am Posts: 68
|
 Re: **Error**:Calling procedure 'sendI2CMsg' - with ROBOTC 3
Ok
true
it works
it seems to be the key of lot of problems ?
but it is strange that it call
#include "firmwareVersion.h"
if this file is not in the computer ?
in any way thanks
didier
|
Sun Sep 23, 2012 4:30 am |
|
 |
NeXT-Generation
Senior Roboticist
Joined: Wed Sep 28, 2011 10:13 pm Posts: 630 Location: If I told you, I'd have to kill you.
|
 Re: **Error**:Calling procedure 'sendI2CMsg' - with ROBOTC 3
Thanks!! I was trying to fix this myself... But, you know me...
EDIT: confirmed and working with my PID LineLeader line-follower.
_________________A.K.A. inxt-generation Self-proclaimed genius, and future world dominator. My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth Doctor Bow down to Nikola Tesla, King of the Geek Gods.
|
Sun Sep 23, 2012 9:02 am |
|
 |
MikeJMcFarlane
Rookie
Joined: Thu Sep 13, 2012 9:43 am Posts: 47
|
 Re: **Error**:Calling procedure 'sendI2CMsg' - with ROBOTC 3
This fixed my prob too, thanks. Hope the hol is going well and you aren't spending all your time glued to the forum:-)
|
Mon Sep 24, 2012 6:28 am |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: **Error**:Calling procedure 'sendI2CMsg' - with ROBOTC 3
Oh, I am not, don't worry  I am back now but totally pooped. Hopefully I can do some final testing of my suite tomorrow evening and then release the first beta, so you guys can get your hands dirty with it. - Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Mon Sep 24, 2012 3:14 pm |
|
|
|
Page 1 of 1
|
[ 8 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|