Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-04

Bluetooth package error

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Anthony Tekatch

Hello,

I'm trying to get the Bluetooth package running (here): http://wiki.freepascal.org/Bluetooth
and got the following error on Lazarus V1.1;

Error: Fields cannot appear after a method or property definition, start a new visibility section first

at this line:
  WiiMotes: TWiiMotes;

in this file:
WiiMoteTools.pas

I think that this file needs to be updated by putting the constructor / destructor / procedure / function definitions after the variable definitions.

If I am right, can someone update the source code?

Also, I noticed that the "hci_inquiry_1" returns 0 if only one Bluetooth device is found, in WiiMoteTools.pas :

  "for i:=0 to found_devices-1 do begin"

will not work, it should be changed to:

  "for i:=0 to found_devices do begin"

Thanks,
Anthony

Reply by email

Anthony Tekatch
to Anthony Tekatch
Anthony Tekatch wrote 5 lines
Also, I noticed that the "hci_inquiry_1" returns 0 if only one Bluetooth device is found, in WiiMoteTools.pas : "for i:=0 to found_devices-1 do begin" will not work, it should be changed to: "for i:=0 to found_devices do begin"

Oops, I was wrong about this returned device count, it does = 1 if one device is found. No change required for my "hci_inquiry_1" issue.

Anthony

Reply by email

Mattias Gaertner
to Anthony Tekatch: I'm trying to get the Bluetooth package running (here):…
Show quoted text 19 lines
Hello, I'm trying to get the Bluetooth package running (here): http://wiki.freepascal.org/Bluetooth and got the following error on Lazarus V1.1; Error: Fields cannot appear after a method or property definition, start a new visibility section first at this line: WiiMotes: TWiiMotes; in this file: WiiMoteTools.pas I think that this file needs to be updated by putting the constructor / destructor / procedure / function definitions after the variable definitions. If I am right, can someone update the source code?

Thanks for the hint. I updated the source code.

[...]

Mattias

Reply by email