Running scripts and REPL

I understand you can run some Lua code snippets using REPL to help debugging and ask for some help on getting started with this?
Debugging a script that is been uploaded and then fails is very frustrating as there seems no way to see what has happened?
If anyone can provide some clear and simple instructions on using REPL it would be appreciated!

Michael did a demo of REPL at the last developers conference.

You could also run the script in SITL. Iā€™ve found that to be kind of handy to debug things. One other option is there is also a restart-scripts parameter PR.

Thanks.
I have seen the video but I canā€™t get REPL to connect.
On clicking the Connect Button I canā€™t get past this.

image

It just hangs and I have to terminate MP using Task Manager.
Iā€™m using an Orange Cube with the latest firmware dated 2 Sep

Obviously something is not set correctly ?

The SCR_RELOAD parameter sounds great but it doesnā€™t show up as a parameter setting.

Any help would be appreciated!

Are you on latest Mission Planner 1.3.73? Could you also try the beta version?

Hi
I tried these versions
image
image

The first version MP just locked up again.
With the beta version I got this message.

image

Thank you! Iā€™ve got the same thing on my end as well and wanted to double check. @WickedShell Is this a known bug? Iā€™m not seeing one tracked on Github.

Thanks. Great to find its not me for a change! :grinning:

Any news on getting REPL working?

I have also not had any luck with the MAVLink repl on real hardware, seems to work OK with mission planner and SITL.

Loading the SITL via the Mission Planner simulation tab and connecting to the RELP should work fine for testing scripts.

Thanks and Iā€™ll give it a try.

Any updates on SCR_RELOAD?

No, sorry.

Too many things, not enough time.

I will get back to it eventually.

Understandable. Thanks :grinning:

The REPL should now be working on beta MP.

1 Like

Thanks and Iā€™ll check it out.

Is that MP or Cube Beta?
Orange Cube Beta gives me this.

image

I couldnā€™t find a MP Beta.
https://firmware.ardupilot.org/Tools/MissionPlanner/.

Mission Planner beta, Got to the help tab and click Check for BETA Updates

Tried that and it downloaded the update then it rebooted.
But REPL still didnā€™t connect.
image

I think you will also need to be on master Arducopter, ctrl + q on the load firmware page, and enable scripting

Got it going. Had copter beta loaded and when I changed to latest it worked.
Thanks

1 Like