Board index FlightGear Development Canvas

Reset, reinit and Canvas  Topic is solved

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Reset, reinit and Canvas

Postby Necolatis » Mon Jul 07, 2014 2:13 am

In Fg 3.1 latest nightly on Windows (and also on 3.1 in Linux too), when a reset happens the canvas on my HUD and radar screen continue to show the old canvas from before the reset.
Nasal does not complain over anything.

What do we have to be aware off in regards to reset and Canvas? Is there a signal I can listen to and then delete and remove the Canvas, will that help? Or is the nasal system also reset so no nasal code can be run from before the reset?
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2045
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Reset, reinit and Canvas

Postby Hooray » Mon Jul 07, 2014 2:15 pm

hi, just briefly, see Zakalawe's comments at:

$FG_SRC/Main/fg_init.cxx @1000+
Code: Select all
SGSubsystemMgr* subsystemManger = globals->get_subsystem_mgr();
    // Nasal is manually inited in fgPostInit, ensure it's already shutdown
    // before other subsystems, so Nasal listeners don't fire during shutdonw
    SGSubsystem* nasal = subsystemManger->get_subsystem("nasal");
    nasal->shutdown();
    nasal->unbind();
    subsystemManger->remove("nasal");



What exactly is it that you'd like to do ?
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11437
Joined: Tue Mar 25, 2008 8:40 am

Re: Reset, reinit and Canvas

Postby Necolatis » Mon Jul 07, 2014 3:29 pm

I just want canvas to work again after a reset.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2045
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Reset, reinit and Canvas

Postby TheTom » Mon Jul 07, 2014 3:59 pm

I'm just seeing the same here. Will have a look at it...
TheTom
 
Posts: 321
Joined: Sun Oct 09, 2011 10:20 am

Re: Reset, reinit and Canvas  

Postby TheTom » Fri Jul 11, 2014 5:17 pm

Should be fixed now.
TheTom
 
Posts: 321
Joined: Sun Oct 09, 2011 10:20 am

Re: Reset, reinit and Canvas

Postby Necolatis » Fri Jul 11, 2014 5:52 pm

Awesome, thanks!
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2045
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Reset, reinit and Canvas

Postby Necolatis » Sat Jul 12, 2014 5:00 am

Yes, works now, great.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2045
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10


Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest