CanComms.RxOpenStandard still can't accept variable bus #

Support forum for users of the M1 Build

Re: CanComms.RxOpenStandard still can't accept variable bus

Postby Gaston on Sat Nov 10, 2018 12:52 am

Thanks a Lot !!! :oops: :oops: :oops: :oops: ;) ;) ;)
Gaston Scazzuso
whatsapp: +54(9)11 5385 1996
mail: soporte@moteclatinoamerica.com
User avatar
Gaston
 
Posts: 20
Joined: Mon Dec 15, 2008 12:16 pm
Location: Buenos Aires - Argentina

Re: CanComms.RxOpenStandard still can't accept variable bus

Postby MalcolmG on Tue Dec 04, 2018 3:48 pm

DarrenR wrote:
Code: Select all
local h = CanComms.RxOpenStandardBuffered(0, 0x100, 0xF, true);

local canID = 0x105;

if (CanComms.RxFindMessage(h, canID, 0, 0, 0))        //finds the newest message with id 0x105 (set in by the local).
{
                Channel = CanComm.GetUnsignedInteger(h, 16, 16);
}


FYI it looks like this line:
Code: Select all
if (CanComms.RxFindMessage(h, canID, 0, 0, 0))


actually needs to be like this for it to validate:
Code: Select all
if (CanComms.RxFindMessage(h, canID, 0, 0, 0x0))
MalcolmG
Pro User
 
Posts: 76
Joined: Fri Dec 18, 2015 1:34 pm
Location: Auckland, NZ

Re: CanComms.RxOpenStandard still can't accept variable bus

Postby DarrenR on Fri Jan 25, 2019 4:11 pm

MalcolmG wrote:
DarrenR wrote:
Code: Select all
local h = CanComms.RxOpenStandardBuffered(0, 0x100, 0xF, true);

local canID = 0x105;

if (CanComms.RxFindMessage(h, canID, 0, 0, 0))        //finds the newest message with id 0x105 (set in by the local).
{
                Channel = CanComm.GetUnsignedInteger(h, 16, 16);
}


FYI it looks like this line:
Code: Select all
if (CanComms.RxFindMessage(h, canID, 0, 0, 0))


actually needs to be like this for it to validate:
Code: Select all
if (CanComms.RxFindMessage(h, canID, 0, 0, 0x0))


You are correct, the argument is an unsigned integer so needs to be written in hex - 0x... My mistake.
Thanks!
Darren Reynolds
MoTeC Research Centre - Melbourne, Australia.
DarrenR
MoTeC
 
Posts: 176
Joined: Thu May 01, 2008 2:15 pm
Location: Melbourne, Australia

Previous

Return to M1 Build

Who is online

Users browsing this forum: No registered users and 13 guests