Board index FlightGear Support Interfacing

FGFS Interface

Connecting two computers, using generic protocol, connecting with Matlab?

Re: FGFS Interface

Postby daweed » Wed Jul 20, 2022 7:24 pm

TheEagle wrote in Wed Jul 20, 2022 6:19 pm:Make a wrapper around the function like this:
Code: Select all
globals.controls._startEngine = globals.controls.startEngine;
globals.controls.startEngine = func(v = 1, which...) {
    debug.dump(v);
    globals.controls._startEngine(v, which);
};


Hello TheEagle,

I am not sure to understand

Which one is to have original role and wrapper role ? (globals.controls._startEngine is the original function and globals.controls.startEngine the wrapper ?)

I should have been more specific about the problem I'm having:

So to make things clear:

on the Airbus (at least on the 330) the MCDU screen is refreshed every 0.125 seconds

There is a timer that refreshes the canvas (the MCDU screen in Models/Instruments/MCDU/MCDU.nas):

var MCDU_update = maketimer(0.125, func {
canvas_MCDU_base.update();
});

canvas_MCDU_base.update() calls MCDU_1.update() which itself calls me.updateCommon() which refreshes the screen. (all theese func are in the same Nasal File (the MCDU screen in Models/Instruments/MCDU/MCDU.nas)

To refresh the screen on the physical MCDU (the one I am building) I would like to detect the execution of the me.updateCommon function which is in a Nasal file specific to the airbus, but without having to modify the files of the airbus otherwise each time the airbus is going to be updated I will lose the modification

The idea would be to update a specific property in the tree structure of the interface to update when the function is executed and this property would be propagated via generic protocols to the hardware interface

Because otherwise, even if I don't have the choice to modify the original function, as much as I put the new property directly in the code of the function, I just have to put a setValue at the end of its code.

But maybe I misunderstood your example.


Best regards
Last edited by daweed on Wed Jul 20, 2022 7:39 pm, edited 1 time in total.
Windows 10 / Linux Mint 20
AMD Ryzen 7 3700X |32 Go RAM GeForce RTX 3070 Ti 8 Go
FG Interface
Lyon Saint Exupery Scenery

ATC on LFLL on Friday 19:00 UTC => 22:00 UTC
daweed
 
Posts: 398
Joined: Thu Dec 11, 2014 11:45 am
Location: LFKP LFLL
Callsign: daweed
OS: Linux Mint 20

Re: FGFS Interface

Postby TheEagle » Wed Jul 20, 2022 7:35 pm

daweed wrote in Wed Jul 20, 2022 7:24 pm: (globals.controls._startEngine is the original function and globals.controls.startEngine the wrapper ?)

Exactly.
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3413
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: FGFS Interface

Postby daweed » Thu Jul 28, 2022 10:47 pm

Quick video, it's always status WIP

MCDU Hardware based on Hispapanel PCB & FG Interface I/O Card



Regards

Daweed
Windows 10 / Linux Mint 20
AMD Ryzen 7 3700X |32 Go RAM GeForce RTX 3070 Ti 8 Go
FG Interface
Lyon Saint Exupery Scenery

ATC on LFLL on Friday 19:00 UTC => 22:00 UTC
daweed
 
Posts: 398
Joined: Thu Dec 11, 2014 11:45 am
Location: LFKP LFLL
Callsign: daweed
OS: Linux Mint 20

Re: FGFS Interface

Postby wkitty42 » Fri Jul 29, 2022 1:13 am

Video unavailable
Playback on other websites has been disabled by the video owner
Watch on YouTube
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: FGFS Interface

Postby daweed » Fri Jul 29, 2022 7:25 am

Hello,

Oups, should be ok now
Windows 10 / Linux Mint 20
AMD Ryzen 7 3700X |32 Go RAM GeForce RTX 3070 Ti 8 Go
FG Interface
Lyon Saint Exupery Scenery

ATC on LFLL on Friday 19:00 UTC => 22:00 UTC
daweed
 
Posts: 398
Joined: Thu Dec 11, 2014 11:45 am
Location: LFKP LFLL
Callsign: daweed
OS: Linux Mint 20

Re: FGFS Interface

Postby wkitty42 » Fri Jul 29, 2022 9:49 am

yep... looks better... at least the preview shows up here now :)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: FGFS Interface

Postby daweed » Sun Sep 11, 2022 8:40 am

MIPS block assembly test

Image
Windows 10 / Linux Mint 20
AMD Ryzen 7 3700X |32 Go RAM GeForce RTX 3070 Ti 8 Go
FG Interface
Lyon Saint Exupery Scenery

ATC on LFLL on Friday 19:00 UTC => 22:00 UTC
daweed
 
Posts: 398
Joined: Thu Dec 11, 2014 11:45 am
Location: LFKP LFLL
Callsign: daweed
OS: Linux Mint 20

Re: FGFS Interface

Postby daweed » Sat Mar 11, 2023 2:11 pm

Hello guys,

could someone tell what should be done if i would like to add record length when data are sent when using generic protocol ?

Regards

David
Windows 10 / Linux Mint 20
AMD Ryzen 7 3700X |32 Go RAM GeForce RTX 3070 Ti 8 Go
FG Interface
Lyon Saint Exupery Scenery

ATC on LFLL on Friday 19:00 UTC => 22:00 UTC
daweed
 
Posts: 398
Joined: Thu Dec 11, 2014 11:45 am
Location: LFKP LFLL
Callsign: daweed
OS: Linux Mint 20

Previous

Return to Interfacing

Who is online

Users browsing this forum: No registered users and 6 guests