micmonay / simconnect Goto Github PK
View Code? Open in Web Editor NEWGolang SimConnect for FS2020 ✈️
License: MIT License
Golang SimConnect for FS2020 ✈️
License: MIT License
Is someone is able to help me?
func main() {
sc, err := simconnect.NewEasySimConnect()
if err != nil {
panic(err)
}
go connectToSimVars(sc)
time.Sleep(3 * time.Second)
event := sc.NewSimEvent(simconnect.KeyAutopilotOff)
event.Run()
for {
fmt.Println(sc.IsAlive())
time.Sleep(time.Second * 3)
}
}
func connectToSimVars(sc *simconnect.EasySimConnect) <-chan []simconnect.SimVar {
cSimVar, err := sc.ConnectToSimVar(
simconnect.SimVarPlaneAltitude(),
simconnect.SimVarAutopilotMaster(),
)
if err != nil {
panic(err)
}
for {
result := <-cSimVar
fmt.Println(result)
}
}
after i run this program i get updated sim data few time every second. After i send event to sc loop in connectToSimVars() stops. But i still get info that sc is alive (last loop)
I have problem with all g1000 events. None of them work for me. I have no problems with other events like AUTOPILOT_ON, COM_RADIO_FRACT_INC etc. But all events for G1000 like G1000_PFD_MENU_BUTTON, G1000_PFD_SOFTKEY1 does not work with cessna 172 skyhawk.
Do i have to pass any value? I tried 0,1,2,10,100. I don’t have any g1000 mod.
Is it project is abandoned?
Hello,
I took the example file, but I tried to connect two interfaces to the SimVar.
simConnection.ConnectInterfaceToSimVar is always giving me an error.
I use your sample code in my program. When my first flight is over,the get var stoped.But when i back to the home page and start a new flight,the program did not continue to run.I have to close and open it again.can you help me ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.