Bitte ändert euer Passwort!

Im März 2026 wurde das Forum gehackt. Dabei hatten die Angreifer Zugriff auf die Datenbank und somit Zugriff auf eure Passwörter. Auch wenn das Forum kein Passwort im Klartext speichert, können die Angreifer eure Passwörter knacken. Bitte ändert daher dringend euer Passwort für das Forum. Solltet ihr das gleiche Passwort auch an anderer Stelle verwenden, ändert es bitte unbedingt an allen Stellen!

HELP : Lua Code for a Batter Capacity Rest

  • skyfreak
  • Offline
  • Platinum Mitglied
  • Platinum Mitglied
  • Beiträge: 2947
  • Thanks: 1450

Re: HELP : Lua Code for a Batter Capacity Rest

11 Aug. 2021 07:14
#
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.

  • rolfbartels
  • Autor
  • Offline
  • Neues Mitglied
  • Neues Mitglied
  • Beiträge: 9
  • Thanks: 0

Re: HELP : Lua Code for a Batter Capacity Rest

15 Aug. 2021 13:13
#
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.

  • LeonAir
  • Offline
  • Senior Mitglied
  • Senior Mitglied
  • Beiträge: 57
  • Thanks: 58

Re: HELP : Lua Code for a Batter Capacity Rest

15 Aug. 2021 14:01
#
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.

  • davidmcq137
  • Offline
  • Senior Mitglied
  • Senior Mitglied
  • Beiträge: 79
  • Thanks: 87

Re: HELP : Lua Code for a Batter Capacity Rest

19 Okt. 2021 03:33
#
@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.

Moderatoren: ThornIG-Modellbau
Ladezeit der Seite: 0.522 Sekunden
Powered by Kunena Forum