Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1
  • 2

THEMA:

HELP : Lua Code for a Batter Capacity Rest 11 Aug 2021 09:14 #7

  • skyfreak
  • skyfreaks Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Beiträge: 2946
  • Dank erhalten: 1445
er will einen resett der capacity
die calculated capacity hat sows IMHO da kann er abschauen
denn so wie ich es verstehe will er keine app und auch nicht deine nutzen sondern seine um diese funktion erweitern
Fliegergruss
GUIDO



_________________________________________________________
Too many dicks on the dance floor.
Too many dicks!​


Bitte Anmelden oder Registrieren um der Konversation beizutreten.

HELP : Lua Code for a Batter Capacity Rest 15 Aug 2021 15:13 #8

  • rolfbartels
  • rolfbartelss Avatar Autor
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Beiträge: 9
  • Dank erhalten: 0
I am using powerboxes in my large scale planes, used/available mah capacity reported by the powerbox can be reset by assigning a switch to a channel, I am trying to find out how I can code a switch activation in lua, which i'll assign to the channel that will reset the capacity in the powerbox,

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

HELP : Lua Code for a Batter Capacity Rest 15 Aug 2021 16:01 #9

  • LeonAir
  • LeonAirs Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Beiträge: 57
  • Dank erhalten: 58
As page 13 of the Lua api states:
You can register a Lua control via system.registerControl and then set it's state with system.setControl.
Then simply select the lua control as the input of the reset channel.

Leon

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

HELP : Lua Code for a Batter Capacity Rest 19 Okt 2021 05:33 #10

  • davidmcq137
  • davidmcq137s Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Beiträge: 75
  • Dank erhalten: 80
@rolfbartels,

Lua apps can control an servo output .. look at the system.registerControl and system.setControl API calls. It creates a function (e.g. just like a stick or knob) but that is controlled by lua code and you can assign a servo output to it. I use it all the time, for example for autothrottle, or for my parachute deployment app.

Are you thinking about a lua app that, when it wakes up, and finds that the battery value has jumped up from a previously saved value, it cycles an output channel to tell the PB that the battery was charged?

Dave

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • Seite:
  • 1
  • 2
Moderatoren: ThornIG-Modellbau
Ladezeit der Seite: 0.201 Sekunden
Powered by Kunena Forum