GTuner.functions()

GCV scripting for Gtuner IV and Titan Two. Configuration, examples, questions.

GTuner.functions()

Postby eom85 » Tue May 18, 2021 6:34 am

Hey devs, could you let us know which gpc functions are currently implemented in gcv? E.g. I know that Gtuner.get_actual() works but Gtuner.event_active() doesn’t.
Also, is there any chance to pass a variable back and forth between the two or is gcv_read() the only option?
User avatar
eom85
First Sergeant
First Sergeant
 
Posts: 65
Joined: Wed Jun 21, 2017 7:51 pm

Re: GTuner.functions()

Postby Scachi » Tue May 18, 2021 7:29 am

event_ like functions are not available in .py , you have to implement them yourself.
same as when working with keyboard or mouse, there as also no event_ functions available directly via gtuner.

You can pass values back and forth in different ways, they ways I know:
.py -> .gpc : gcv_read()
.gpc -> .py : via set_val using some GPC designator of your choice and using gtuner.get_val to read it
.gpc -> .py : gpc:printf("GCMD:ComputerVision.PY:......) and py:gtuner.gpc_string()
see https://github.com/J2Kbr/GtunerIV/issues/406
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: GTuner.functions()

Postby eom85 » Tue May 18, 2021 10:21 am

Exactly what I was looking for! Thanks a lot mate!
User avatar
eom85
First Sergeant
First Sergeant
 
Posts: 65
Joined: Wed Jun 21, 2017 7:51 pm

Re: GTuner.functions()

Postby brianomatic » Mon Aug 02, 2021 5:51 pm

Hello - I am looking for a more robust list of Gtuner functions that i can use inside of the python script.

I am looking to use teh gtuner to write modules

but I want the python script to fire off the modules based on various things.

Also It would be nice to not have to use the console output or reading of buttons as I send a lot of data from the gtuner to the python to do calculations. If i use the console output on the gtuner and read it in the python script it either grabs the wrong value or duplicates it when I try to read multiple variables.

Any help on this would be nice.

Actual documentation on what all i can call using gtuner() in the python script would be a godensd.

Thank you for all the hard work you do!
User avatar
brianomatic
Private First Class
Private First Class
 
Posts: 3
Joined: Mon Jul 12, 2021 12:38 pm

Re: GTuner.functions()

Postby Mad » Wed Aug 10, 2022 3:40 am

brianomatic wrote:I send a lot of data from the gtuner to the python to do calculations. If i use the console output on the gtuner and read it in the python script it either grabs the wrong value or duplicates it when I try to read multiple variables.

Send all the variables at once and split the string.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am


Return to Gtuner Computer Vision

Who is online

Users browsing this forum: No registered users and 63 guests