Replies: 1 comment
-
Apparently the plane dialogues are using the following mechanism, to save the plane e.g. into a file: It uses the PlaneFileGlue.cpp code here: XCSoar/src/Plane/PlaneFileGlue.cpp Line 202 in a8701dd exactly PlanGlue::WriteFile( plane, path ) to save the complete plane with all its masses into the .xcp file: in my opinion we could just trigger a PlanGlue::WriteFile( plane, path ); as this is done e.g. here: XCSoar/src/Dialogs/Plane/PlaneListDialog.cpp Line 252 in a8701dd The only thing to be done externally to this call is to append the .xcp extension to the file name, a simple functionality we can move into the PlaneFlileGlue.cpp, as this code only deals with planes and files for planes and fits well there and then can be reused in the place where external settings from external devices are handled. something like of course reuse this in the dialogue, and then we may call where we need to: or even migrate this completely into WriteFile() by removing the second parameter. Similar to the plane there is in Profile.cpp Profile::Save(), that not even needs a parameter, and takes care itself for changes by IsModified(), that should do what is expected once we alter data in the profile map. Thoughts ? |
Beta Was this translation helpful? Give feedback.
-
An architectural question here.
Up to now apparently none of the config changes introduced from external devices have been made permanent, or stored in a profile.
With the new empty weight this requirement seems to be present now.
The configuration of a seperate empty weight besides the reference weight a polar has been setup up, as well as the crew weight representing everything besides bumpable water ballast has been introduced symmetrically also in the XCV varionmeter.
XCV also allows to change these values, a sync of empty weight, crew weight, water ballast, and bugs is desirable. Only the empty weight should be permanent and the same after a restart of XCS. The crew weight is set to a default after restart .. acceptable; water and bugs are set to zero after a restart .. improvable, but accepted so far.
The architectural design of who things are connected in XCS is not entirely transparent to me. The registry key that are needed to store the plane profile items are owned by the plane details dialog. So it seems currently difficult to change the plane profile besides the dialog.
Any advise or thoughts to this?
Beta Was this translation helpful? Give feedback.
All reactions