Search found 3684 matches

by SimPassion
Wed Oct 05, 2022 12:21 pm
Forum: Lua and API Scripting Help
Topic: LUA script for stepper ENA+ ??
Replies: 12
Views: 121

Re: LUA script for stepper ENA+ ??

Haha no :D There are some examples for Lua. But I suppose that it would be better to do this in C. Yes, this is where the Octave package should help (G++ and Fortran) : https://octave.sourceforge.io/control/index.html https://octave.sourceforge.io/control/overview.html https://docs.octave.org/doxyg...
by SimPassion
Wed Oct 05, 2022 11:57 am
Forum: Lua and API Scripting Help
Topic: LUA script for stepper ENA+ ??
Replies: 12
Views: 121

Re: LUA script for stepper ENA+ ??

 
Nothing really complicated ;-)

image.png
image.png (20.45 KiB) Viewed 33 times

https://en.wikipedia.org/wiki/PID_controller
https://octave.sourceforge.io/control/function/pid.html

 
by SimPassion
Wed Oct 05, 2022 10:15 am
Forum: Lua and API Scripting Help
Topic: Struggling with LUA and the basics
Replies: 28
Views: 495

Re: Struggling with LUA and the basics

1 - Is that a part of basic LUA coding that might be described in LUA programming books? Does that use of a formula have a name so I could find it in the index of a LUA book? 2 - So if I undrstand the use of the multipy....the variable 'position' can only be 0 or 1(the two switch positions of OFF o...
by SimPassion
Tue Oct 04, 2022 10:32 pm
Forum: Lua and API Scripting Help
Topic: Struggling with LUA and the basics
Replies: 28
Views: 495

Re: Struggling with LUA and the basics

.../... 1 - Does the asterisk mutiply the value of the variable 'position' by 2 to produce a new number? 2 - That multiplication symbol is not described in any of the examples from the siminnovations wiki pages that I can find. 1 - Exactly 2 - The value can be the result of a formula, which is by d...
by SimPassion
Tue Oct 04, 2022 2:42 pm
Forum: Lua and API Scripting Help
Topic: Struggling with LUA and the basics
Replies: 28
Views: 495

Re: Struggling with LUA and the basics

.../... Again, what does the asterisk do? The * between position and the 2 value. Thanks for your help with this. Yes the * is used as the multiply sign in "position * 2" But why? Never have seen that in any code example. Hi Kirk, it's only a solution based on the values you were expectin...
by SimPassion
Tue Oct 04, 2022 8:09 am
Forum: Lua and API Scripting Help
Topic: Struggling with LUA and the basics
Replies: 28
Views: 495

Re: Struggling with LUA and the basics

Kaellis991 wrote: Mon Oct 03, 2022 10:18 pm .../...
Again, what does the asterisk do? The * between position and the 2 value.

Thanks for your help with this.
Yes the * is used as the multiply sign in "position * 2"
by SimPassion
Mon Oct 03, 2022 9:24 pm
Forum: Lua and API Scripting Help
Topic: Struggling with LUA and the basics
Replies: 28
Views: 495

Re: Struggling with LUA and the basics

I duplicated that code in my AM hardware code and get this error when I select run, when I press the physical switch and when I change the switch slider from 0 to 1 in the hardware tab next to hardware properties. ERROR - Error in hardware switch callback: attempt to call a nil value The lightbulb ...
by SimPassion
Mon Oct 03, 2022 8:58 pm
Forum: Lua and API Scripting Help
Topic: Struggling with LUA and the basics
Replies: 28
Views: 495

Re: Struggling with LUA and the basics

 
So, this one

image.png
image.png
 
by SimPassion
Mon Oct 03, 2022 8:37 pm
Forum: Under development and finished work
Topic: PA-30 Twin Comanche Gauges
Replies: 5
Views: 68

Re: PA-30 Twin Comanche Gauges

  Here's a sample one from Milviz : image.png a very similar from Air Manager Online Store download, is this one from William Hayes : image.png image.png --------------------------------------------- -- Properties -- --------------------------------------------- prop_BG = user_prop_add_boolean("...
by SimPassion
Mon Oct 03, 2022 10:15 am
Forum: Lua and API Scripting Help
Topic: Struggling with LUA and the basics
Replies: 28
Views: 495

Re: Struggling with LUA and the basics

Well, as a start point, we should always specify which addon is used when starting a new thread, because those who will help don't necessary get this point in mind So the aircraft is the Justflight Piper PA-28 Arrow III, if I'm not wrong : https://siminnovations.com/forums/viewtopic.php?p=28740#p287...