With the recent contribution of Ardu pilot developers, I expect to utilize viewpro gimbal.
After receiving the file from github and installing it on the FC, I received the following message.
Prearm:Scripting: /APM/scripts/mount-viewpro-driver.lua:555: attempt to index a nil value (global ‘camera’)
May I know the solution?
All settings are set according to the wiki page and github md file.
Set SERIALx_PROTOCOL = 28 (Scripting) where "x" corresponds to the serial port connected to the gimbal
Set SCR_ENABLE = 1 to enable scripting and reboot the autopilot
Set MNT1_TYPE = 9 (Scripting) to enable the mount/gimbal scripting driver
Set CAM1_TYPE = 7 (Scripting) to enable the camera scripting driver
Set RCx_OPTION = 300 (Scripting1) to allow real-time selection of the video feed and camera control
Is there anything I missed?
Thanks for giving this a try. I think the issue is the link on the wiki is to “latest” when it should be to our Copter-4.4. branch. I will update the wiki.
Could you try the version here in our Copter-4.4 directory?
Hi @rmackay9 , I’m trying the viewpro gimbal settings too. I’m getting an error in the Lua Script.
I have got a message saying " PreArm: Scripting: Error: /APM/scripts/mount-viewp ".Could anyone help me out with this? I had downloaded the lua file for 4.4. I’m using the same version firrmware as well.
File “C:\Users\Amit\Downloads\mount-viewpro-driver.lua”, line 72
SyntaxError: Non-ASCII character ‘\xc2’ in file C:\Users\Amit\Downloads\mount-viewpro-driver.lua on line 72, but no encoding declared; see PEP 263 – Defining Python Source Code Encodings | peps.python.org for details
One tricky thing about downloading the script is that you need to be sure that you get the text file and not the web page.
It might help to download it using this RAW link instead.
Another idea is to open the file in an editor on your machine and make sure that it looks like what’s shown at the link above and doesn’t look like HTML.
thank you to reply
it’s work at your link file
mount control, retract, neutral, and camera shutter, record, eo/ir change… working well.
Hey all, sorry this might be dump question from me. I’m getting mount not healthy message. Is there any other settings that I need to check?. I have followed the page and added the params as explained. Need a help here for that.
@rmackay9 still its not working for me. I tried the steps as given in the LUA file.
Any chance you could include an onboard log?
Hi @rmackay9 ,
Thanks for the patience, I’m back on testing. Took a while. I’m attaching the image.
It looks like you’re trying to run the script on the ground station but the script it meant to be loaded on the autopilot’s SD card. Wiki instructions are here.
@rmackay9 , I have the script running inside the memory card. May be channel setting thing. I have followed the instructions. Is there any other settings I need to check?
The script has to run on the flight controller, not on your PC
To help further I really need to see an onboard log. This will give me all kinds of information about the configuration and even the script that is loaded.
I have the script in my flight controller. I had run in the console as it showed some error and to check that out.
The memory card is inside the flight controller and not in the computer. I’ll share you the logs.
OK, that screen shot of Visual Studio threw us off.
I wonder if perhaps the file ends in .txt instead of .lua?
00000037.BIN (401.5 KB)
The BIN file
Thanks for that. So the issue is that the file has a super long name and ends in .txt.
Could you rename the file on the SD card to mount-viewpro-driver.lua?