×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Canon DSLR focus module

  • Posts: 602
  • Thank you received: 281

Replied by John on topic Canon DSLR focus module

Hi Walter,

Thanks for the log. I think I can see the problem, although I haven't been able to reproduce it in a simulator environment, but I think that is because the environment doesn't resemble your equipment closely enough.

So it looks like your focuser (which I assume is built into your canon) doesn't keep score of absolute position itself but moves relative to where it is. Does that make sense? This isn't a problem of course, I'm just making sure I understand the scenario properly.

Anyway, I will continue to try to reproduce the scenario in my test region. Assuming I can do that and then make some code change to fix it, are you able to take off-cycle code changes? That means can you build Kstars from source yourself, or are you able to take one of the bleeding-edge executables and run that? Since I don't have a DSLR myself I will only be able to do the most basic testing so would rely on you to test any changes (assuming I am actually able to make them, of course).
7 months 3 weeks ago #95449

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 1
I will try setting up a kstars dev environment and see if I can get a build happening.

I found kstars on github. If I have trouble I'll let you know.

Are the indi-device components part of kstars are do I need to build them separately?
Last edit: 7 months 3 weeks ago by WalterZambotti.
7 months 3 weeks ago #95483

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 1
I have managed to build kstars 3.6.7 beta from the github repo. The invent.kde.org git would not allow me access!

Just confirming the 3.6.7 BETA version still has the same issue, but I assume you haven't committed any changes in relation to this issue, yet.

But I am ready for any changes and testing!
7 months 3 weeks ago #95498

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 1

Yes the focuser is built into the camera. Yes, that is my belief as well (the focuser only takes relative position commands). That part seems to be fine as the focuser is moving as expected in both directions.
7 months 3 weeks ago #95499

Please Log in or Create an account to join the conversation.

  • Posts: 602
  • Thank you received: 281

Replied by John on topic Canon DSLR focus module

Hi Walter,

I've created merge request: 991
invent.kde.org/education/kstars/-/merge_requests/991

It isn't merged. Are you able to take unmerged MRs and rebuild?

It contains:
1. Some changes to (hopefully) fix the issue where moving in or out is represented as a move out. I'm hoping step in and step out now work both with and without AF Overscan set. I don't exactly know how you focus your DSLR - do you use Ekos or do you use some sort of inbuilt focuser independent of Ekos. My expectation if you use Ekos is that Linear 1 Pass and Linear will work with both AF Overscan on and off, but Polynomial / Iterative will only work with AF Overscan off. If you use Polynomial / Iterative I can fix this but its a bigger change (don't want to do it if its not required).
2. Some extra logging (please set verbose focus + focus driver + indi logging on). So if 1) turns out not to fix the problem hopefully the extra logging will help identify the problem.

I have done some regression testing on the Sims (as I mentioned before I don't have a DSLR) but can't replicate the exact issue you have - so from your perspective this is untested software.
7 months 3 weeks ago #95536

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 1
I fetched that branch and rebuilt.

I can confirm the inward focus now works with pressing the manual in focus button.

However the inward focus via the overscan still does not work. So it is still adding instead of subtracting.

Here is the latest log:

File Attachment:

File Name: log_18-55-54.txt
File Size:145 KB
7 months 3 weeks ago #95540
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 1
Having a look through he code and noticed:
bool Focus::focusIn(int ms)
{
    if (ms <= 0)
        ms = focusTicks->value();
    return changeFocus(-ms);
}
 
bool Focus::focusOut(int ms)
{
    if (ms <= 0)
        ms = focusTicks->value();
    return changeFocus(ms);
}
 
// Routine to manage focus movements. All moves are now subject to overscan
// + amount indicates a movement out; - amount indictaes a movement in
bool Focus::changeFocus(int amount, bool updateDir)
{

changeFocus is been called with the incorrect number of parameters on lines 1804 and 1811. Those calls don't pass an updateDir. But my C++ is not very strong so though I'd ask!
7 months 3 weeks ago #95545

Please Log in or Create an account to join the conversation.

  • Posts: 602
  • Thank you received: 281

Replied by John on topic Canon DSLR focus module

If you look at focus.h you'll see the definition:
bool changeFocus(int amount, bool updateDir = true);

updateDir is an optional parameter which means changeFocus can be called with either 1 or 2 parameters. If called with one parameter then within changeFocus the value of updateDir is true. I've done it this way to minimise changes to other parts of the code base. changeFocus is the routine all moves of the focuser go through.
7 months 3 weeks ago #95549

Please Log in or Create an account to join the conversation.

  • Posts: 602
  • Thank you received: 281

Replied by John on topic Canon DSLR focus module

I've just pushed an update to MR!991 which should fix the inward overscan issue.

Could you post the full log please (there's some debug stuff at initialisation that I'd like to see for your Canon).
7 months 3 weeks ago #95550

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 1

Git isn't reporting any further changes to MR!991.

Fuller logs attached :

File Attachment:

File Name: log_14-02-40.txt
File Size:149 KB
7 months 3 weeks ago #95581
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 602
  • Thank you received: 281

Replied by John on topic Canon DSLR focus module

Thanks for the log.

I added a 1 line change to focus.cpp:


The following user(s) said Thank You: WalterZambotti
7 months 3 weeks ago #95587
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 1
Thanks.

By chance I found myself at the same line of code and I made a similar change (I forced it to pass true for updateDir) .

And it appears to now work correctly.

Not sure why git is still not seeing the change but doesn't really matter.
The following user(s) said Thank You: John
Last edit: 7 months 2 weeks ago by WalterZambotti.
7 months 2 weeks ago #95595

Please Log in or Create an account to join the conversation.

Time to create page: 0.285 seconds