Guider binning

Jasem Mutlaq mutlaqja at ikarustech.com
Wed Apr 1 04:43:59 BST 2020


Hello Hy,

So yes, this is what needs to be done. There is no GUI for kstars.kcfg,
it's just a text file that needs to be editing in XML format. You can go
ahead and send the PR.

However, I was actually thinking about this issue yesterday. Been thinking,
what's the best method to save such options. If we save them in kstars.rc
(kstars.kcfg values become .ini formatted values in kstars.rc if they have
been changed from default), they would be applied universally. So if you
have GuideBinningIndex=1 (2x2), this would be applied _everytime_ for all
profiles and all cameras. Maybe we ought to think about a system where
these settings can be saved per profile basis? Not just this, but many
other settings can be consolidated to be per-profile basis.

We already store the profile in the sqlite database, but I don't think we
should be adding columns for each option out there.. there would be too
much work. Instead we can perhaps have captureSettings, guideSettings..etc
and each can be a base64 encoded version of the actual setting. So when a
profile is loaded, we load the settings from there and use them. If they
don't exist, we use default and save them to the profile. When a user makes
a change, the profile xxxSettings (where xxx is the module) is updated.

Now comes how we can encode/decode the settings? We could use JSON.. it's
already used at some level for EkosLive settings..etc, so it could be
expanded. We can get a QJSonDocument from QJson and then encode that to
base64 and save. Once a profile is started, we load the values from said
profile and apply. This would provide more granular controls than the
current ones which are applied for all profiles.

I'm including KStars development list into this discussion as well since I
believe it is important to have an agreement on this.

--
Best Regards,
Jasem Mutlaq



On Wed, Apr 1, 2020 at 6:17 AM Hy Murveit <murveit at gmail.com> wrote:

> Jasem,
>
> Another quick one:
>
> I have moved to the internal guider, and want to guide with 2x2 binning,
> but it never seems to save the setting (e.g. I set this, but the next time
> I restart EKOS it's back to 1x1). I looked in guide.cpp, and saveSettings()
> doesn't seem to have anything saving binning.
>
> Does it need a line like this in saveSettings()
>   Options::setGuideBinningIndex(binningCombo->currentIndex());
> and something like this in loadSettings()
>   binningCombo->setCurrentIndex(Options::guideBinningIndex());
>
> and I noticed there was nothing for guider binning kstars.kcfg
> (so those functions above I guess wouldn't exist).
>
> I'm not sure exactly what kstars.kcfg does (is there a corresponding gui
> somewhere?
> Would I need to put something in the guide section in there corresponding
> to binning?
> e.g.
> after this:
>    <group name="Guide">
> add this:
>       <entry name="GuideBinningIndex" type="UInt">
>          <label>Which binning to use (0: 1x1, 1: 2x2, 2: 3x3 3:
> 4x4).</label>
>          <default>0</default>
>       </entry>
>
> Is there a gui somewhere that goes with kstars.kcfg?
>
> If you think this is right, I can send you a PR for it.
>
> Hy
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20200401/09ad8d65/attachment.html>


More information about the Kstars-devel mailing list