-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate parameters #2023
Migrate parameters #2023
Conversation
Started to test and found the following issue with removing the Enableling Checkbox for true/false values.
In both cases the leading ";" should be removed. The second one is easy in the migration function: The first one is a problem, as the name of the number is not known! We need to solve this. |
@caco3: I did a quick test. Renaming works like described :-) Some first comments / remarks:
|
@caco3: I'm a little confused. Is the removing of the checkboxes for boolean parameters already included in this PR or will this be done with a separate PR? |
I have removed the checkboxes (again? - thought I already did it). Additionally I have updated the migrate funtion to remove the ";" for the simple parameters (without a number). |
I am sorry for he confusion I caused about the boolean parameters. I will extend the migration function to also support The naming (labels) in the UI is quite random, i wanted to clean that up later, eg. when I add the tooltips again. |
Removed checkbox in UI for ErrorMessage Added migration of pboolean parameters: enable them if they where disabled, set them to their default value, then enable them Switch SetRetainFlag internally to a boolean
Done
I wanted to do as suggested, but then i learned that there is a common class for all them, so I wanted to keep it consistent. |
Is everything done and we can merge it? |
|
Saving CamImages, digit ROIImages and analog ROIImages is working now. |
@Slider0007 @jomjol I hope I have now everything. Please give it another try. |
I cannot test before the weekend. |
@caco3: I did a quick test of UI config page. Does it make sense to add an indication that this config.ini is a migrated one or is it clear due to the new names? (config.ini - firmware version > 14.1). I'll do further testing tomorrow... |
Oh bugger, somehow I missed that, thanks!
That question leads to the question if a parameter should be able to be disabled at all.
Based on the naming it should be clear.
Thank you! |
That's true, so it's totally fine for me 👍 |
@caco3: From my prespective everthing seems OK so far :-) Only one minor: ClassFlowMakeImage.h and ClassFlowMakeImage.cpp are now empty in project. Can they be deleted? |
Thanks!
Right, they got re-added by accident. @jomjol I will merge now and rebase rolling to it so I can proceed with #1986 If you find some issues, we can add another PR to the 14.1 branch |
* Migrate parameters to v14.1 branch (#2023) * Migrated parameters * - * . * . * . * . * . * Remove unneeded checkboxes for true/false * Remove ";" * Correct MaintTopic * Added missing parameters to UI: FlipImageSize, InitialMirror Removed checkbox in UI for ErrorMessage Added migration of pboolean parameters: enable them if they where disabled, set them to their default value, then enable them Switch SetRetainFlag internally to a boolean * . * CamImages -> RawImages * CamImages -> RawImages * catch error on unknown parameter * fix missing case insensitivity * fix typo * fixmissing rename * fix migration of ExtendedResolution * Delete ClassFlowMakeImage.cpp * Delete ClassFlowMakeImage.h --------- Co-authored-by: CaCO3 <[email protected]> Co-authored-by: jomjol <[email protected]> * Update Changelog.md --------- Co-authored-by: CaCO3 <[email protected]> Co-authored-by: jomjol <[email protected]>
@caco3: Using the latest rolling I figured out two more things which needs to be adressed: |
hmm, kannst du das reproduzieren?
Ah, now I understand. |
It is still in the |
* Migrated parameters, see #2023 * remove no longer used "topic" parameter. This is a backport from b21e3c6 * Fix wrong url-encoding, see #2036 resp. #2036 * Threashold -> Threshold * updated changelog --------- Co-authored-by: CaCO3 <[email protected]>
* Replace deprecated actions (#2016) * Update build.yaml * Update build.yaml * Update manual-update-webinstaller.yml * Update manual-update-webinstaller.yml * Update manual-update-webinstaller.yml * Update manual-update-webinstaller.yml * Update build.yaml * preparations for v15.0 (#2063) * Migrated parameters, see #2023 * remove no longer used "topic" parameter. This is a backport from b21e3c6 * Fix wrong url-encoding, see #2036 resp. #2036 * Threashold -> Threshold * updated changelog --------- Co-authored-by: CaCO3 <[email protected]> * DataLogActive is true by default * updated changelog --------- Co-authored-by: CaCO3 <[email protected]>
* Replace deprecated actions (#2016) * Update build.yaml * Update build.yaml * Update manual-update-webinstaller.yml * Update manual-update-webinstaller.yml * Update manual-update-webinstaller.yml * Update manual-update-webinstaller.yml * Update build.yaml * preparations for v15.0 (#2063) * Migrated parameters, see #2023 * remove no longer used "topic" parameter. This is a backport from b21e3c6 * Fix wrong url-encoding, see #2036 resp. #2036 * Threashold -> Threshold * updated changelog --------- Co-authored-by: CaCO3 <[email protected]> * DataLogActive is true by default * updated changelog * Bugfix #1933 (again :-)) * Update Influxdb * re-add missing dropdownbox filling for Postprocessing Individual Parameters * stop auto filling the release notes, it causes more confusion than it helps * Update Changelog.md --------- Co-authored-by: CaCO3 <[email protected]> Co-authored-by: jomjol <[email protected]>
This PR adds a migration function of some parameters:
MakeImage
toTakeImage
LogImageLocation
RawImagesLocation
LogfileRetentionInDays
RawImagesRetention
Demo
FixedExposure
InitialMirror
FlipImageSize
LogImageLocation
ROIImagesLocation
LogfileRetentionInDays
ROIImagesRetention
LogImageLocation
ROIImagesLocation
LogfileRetentionInDays
ROIImagesRetention
ExtendedResolution
<NUMBER>.ExtendedResolution
instead)PreValueUse
<NUMBER>.ExtendedResolution
<NUMBER>.IgnoreLeadingNaN
AllowNegativeRates
<NUMBER>.AllowNegativeRates
N.B. the
<NUMBER>
prefix was missing in the default configErrorMessage
SetRetainFlag
RetainMessages
Topic
MainTopic
DataLogActive
DataLogRetentionInDays
DataFilesRetention
Intervall
Interval
AutoStart
Logfile
LogLevel
True
/False
toWARNING
LogfileRetentionInDays
LogfilesRetention
RSSIThreashold
RSSIThreshold
AutoAdjustSummertime
Also it switches all disabled boolean parameters to their default value . Then enable them.
The corresponding parts in the firmware and Web UI got also updated accordingly.
The migration function gets called at startup and modifies the config file as needed. If one or more parameter needs a migration, it stores the
config.ini
asconfig.bak
before any change to it.The migration has some simplifications:
And all changes are documented in the log file (as ERROR so they show up for sure):
See also discussions in: