Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 2 weeks ago

[quote="azwing" post=29293
In the meantime I should receive STM32 and rest of the hardware so I could be in position to test Teensy/STM32 and Arduino.[/quote]

The STM32 is equivalent in speed and features to the Teensy 3.2 and the MiniPCB. So if you have one, you don't need the other.

In case you have not seen it, there is a PCB for the STM32 now, which makes the build much easier.

I look forward for you sharing the STM32 build details on the group. Many will benefit from seeing others build it.

[/quote]Did you succeed to have your OnStep mount ready for testing?[/quote]

Not yet. I am waiting for the belts before I have a friend help me with drilling holes to mount the motors.

But he (Dave) has a CG5 type mount that runs OnStep with the STM32.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 2 weeks ago

kbahey wrote: Now that I looked in the log, the alignment using plate solving is working as intended.

Before :CM#, there are Sr and Sd commands (set RA, set Dec), and the results from :A?# increment the number of 'stars' aligned on, from 413, to 423 to 433.

The first digit, 4, is the maximum number of alignment stars (because this is an Arduino Mega), and the second digit is the number of star aligned on, and the third digit is the number of stars that are intended to align on.

Once the second and third digit are equal, alignment is complete.

You mentioned that it is not plate solving (too fast or something). That is separate issue, but at least coordinates are returned and are used in Sr, Sd, then CM syncs.

Thanks for testing this. It confirms what I found testing indoors.


Howard merged the plate solving align code into OnStep Alpha (as of a few minutes ago).

So anyone who wants to use the Mount Model tool, can do so, with the stable version of INDI packages (no need for a special fork or branch).

The procedure is the same: click 3 Star (or a number suitable to your controller and obstructions), go to Mount Model and select stars that are far apart, and then click Run. That is all there is to it.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 2 weeks ago

Ignore KStars and INDI for a moment, and focus on USB at the Linux level.

Close KStars and make sure no INDI driver is running, then unplug the controller from your Linux box.

Plug it again, then do the following:

lsusb

Do you see a device for it?

ls -l /dev/ttyU* /dev/ttyA*

Do you see an ACM or USB device?

Install picocom, then do this:

picocom -eq -b9600 /dev/ttyX

(replace X by USB0 or ACM0, depending on what you see above.

If that is successful, enter:

:GU#

See if there is a response.

You may need to add the Teensy's udev rules .

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 3 weeks ago

Now that I looked in the log, the alignment using plate solving is working as intended.

Before :CM#, there are Sr and Sd commands (set RA, set Dec), and the results from :A?# increment the number of 'stars' aligned on, from 413, to 423 to 433.

The first digit, 4, is the maximum number of alignment stars (because this is an Arduino Mega), and the second digit is the number of star aligned on, and the third digit is the number of stars that are intended to align on.

Once the second and third digit are equal, alignment is complete.

You mentioned that it is not plate solving (too fast or something). That is separate issue, but at least coordinates are returned and are used in Sr, Sd, then CM syncs.

Thanks for testing this. It confirms what I found testing indoors.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 3 weeks ago

There are too many variables in your setup.

If it was me doing it, I would do it as follows:

1. On the OnStep side:

a) Download Alpha,
b) patch it with the plate solve align patch
c) Compile it, and upload it to the Mega
d) Using the WiFi, set the longitude, latitude, UTC offset, date and time.

2. On the INDI site:

a) Download the current master (NOT azwing's fork)
b) Compile it. That way you get the buffer fixes and guarantee that the results returned from USB commands are valid.

Test the Plate Solve Align as follows:

1. In INDI click on 3-Stars. Tracking should start.
2. In KStars, select Mount Model, and choose 3 stars that are far apart and visible in your location.
3. Start the Mount Model tool.

Check the screen where KStars display the delta errors (the difference between where the object is, and where it was supposed to be).

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 3 weeks ago

Blueshawk wrote:
Installed alignment patched command.ino and downloaded to mega.

coords not set in firmware after update:
indi would not set them, longitude error. used phone app to set site coords.


That is odd. Latitude and longitude should be set in EEPROM, and recalled from there if they are not sent from KStars. When I am using KStars, I always choose 'KStars updates mount' and that way, longitude, latitude, UTC offset, date and time are all sent at the beginning of sessions. But regardless, if you don't do that, OnStep should remember the last latitude and longitude you used.

Slewed to deneb and checked focus.
Manual plate solve captured and solved but resulted in a loss of ra/dec position. showing all zeros. then captured but could not solved based on previous 00:00:00 coords
patch breaks manual plate solve.

A manual sync after solving by hand also failed to update, and appears to have crashed the mount.


That is odd. Are you using the current master of KStars, or azwing's fork?
There was a problem in the last stable version where INDI would not get back returned data because of the buffer size change (RB_MAX_LEN thing). The fix is in the current master (not the PPA builds yet).

Perhaps that is related?

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 3 weeks ago

This should work:

git checkout Alpha

Then copy your Config.xxx.h, and my Command.ino, and you are now with the latest Alpha with the plate solving patch applied.
git diff Command.ino
will give you the changes, in case you want to review them.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 3 weeks ago

Beta is not a good choice for testing alignment, since Howard added lots of very useful changes in Alpha regarding alignment.

The patch still applies fine on the current Alpha.

$ patch -p1 < /tmp/onstep-plate-solve-align_2018-08-08.txt 
patching file Command.ino
Hunk #3 succeeded at 1991 (offset 2 lines).

Ignore the hunk thing.

Attached is a Command.ino file that is today's Alpha with the patch applied. Rename it from .txt to .ino only, and you are good to go.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 3 weeks ago

@Blueshawk

If you mean the plate solve align, then the best way is to download (or checkout) the latest version of OnStep, then apply my plate solve align patch to it, as per the instructions here .

The procedure to test it is the same as before: Go to the INDI panel click on the 3 star align, then go to Mount Model and select 3 stars to align on, then let it run its alignment. At the end of the process you should get more accurate Goto pointing, and the :A?# command should show 633 as the result.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 4 weeks ago

Alain,

Jasem merged the fix into master. So that part is taken care of now. The next stable should have the fix.

Did you get a chance to test the plate solve align with OnStep (the patch that I created a while ago)?

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 4 weeks ago

Done.

Tested it, and I see the status of the alignment again.

Here is the PR for Jasem.

github.com/indilib/indi/pull/687

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 4 weeks ago

Thanks for finding the root cause.

So, will you create a pull request for the fix against master, or should I do that?

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 1 month ago

I upgraded today to the latest stable KStars and INDI.

The good news is that the driver no longer crashes, after the fixes for the tty_nread changes. So slewing is normal, ...etc.

The bad news: One problem: when starting an Align (1 star or 3 star), the 'Align Process' line does not change to the value returned from :A?#. It still says 'Manual Alignment Process Idle', instead of the return value from said USB command.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 1 month ago

That makes sense.
I have not heard of lots of people using these features within OnStep.
But if something is present, and readable over USB, then why not display a value for it? Maybe of use to someone.

Going back to the Mount Model, and the number of stars to use. In theory, we can modify Ekos to query OnStep via :A?# and automatically select the same number of stars. However, Ekos is not for OnStep only, and tens of other mounts run on it, so I am not not in favour of moving mount-specific complexities in the code and UI for Ekos.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 1 month ago

azwing wrote: @ James
But when working with Ekos I still don't see how to use this except leaving it up to the user.


Yes, when using my patch, it is left up to the user. Since the user has to go into the INDI control panel and select how many stars to align on,
they will also use the same number of stars when selecting them in Mount Model.


Write to EEprom Button:
Even if the Write EEprom button is not necessary for the alignment process, it should be present to allow user to trigger the EEprom write.


Agreed.


Detection of boards:
The ":GXnn# Get OnStep value" could cover board detection.
It returns a lot of information but not the board type as far I could see in the code. May be we can ask Howard to include that?


But that is added complexity. OnStep is fast evolving and there are already many board variants. If someone develops a new board (like I am doing), they will also need changes at the same time in INDI to make things work.

If we keep INDI board agnostic, it is better, since the board developer needs to worry about one side only (the board).

As you said, the :A?# can be queried for the maximum number of alignment stars, and that should suffice.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 1 month ago

Blueshawk wrote: I am however going to use Jasem's align routine to see what it does without the onstep interaction. It looked like a nice way to use plate solving to get aligned, and now even better now that you can pick your own stars, much needed in my forest and I'd like to be more familiar with the procedure for next time.


If you try to use Ekos' Mount Model tool with any OnStep version, no alignment will happen.

That is, unless you:

a) Use the current Alpha of OnStep, AND
b) Patch that Alpha with my patch above.

Only then will Mount Model do alignment by plate solving.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 1 month ago

azwing wrote: @ Khalid,

it seems we are on he same line.
- for number of align stars => should be user choice


Agreed.

- leave the current stable code as is just adding user choice for number of alignment stars


And use the OnStep patch, so Mount Model will do alignment inside OnStep using Plate Solving.

- add a "write to EEprom" button


Agreed.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 1 month ago

azwing wrote: Looking further at James Implementation of Align I think James implementation is as following:

He has Three buttons in a separate tab and four message text fields
"Start Align" => sends ":A6#",


I have not looked at the james' code or the UI, but if 6 is hardcoded, it forces 6-star align.
This will not work with with RAMPS since it is too slow to do that many stars.

Also, the number of stars should be configurable.

Right now in INDI, we have 1-star, 2-star, or 3-star.

"Issue Align" => sends ":A+#" and


We already have that. The Align button does it.

"Finished Align" => sends ":AW#"


The current code does not issue this command, see below.

I think
- the default to 6 star align should be under user control (choser or entry field)
- the last button is necessary since it the the one that asks firmware to store the model into EEprom



Agree with the first point, as my comment above.

As for the :AW# command, we currently do not issue this command, yet align works normally.
I know align works because after doing the final star, the status shows that it is complete (number of stars requested = number of stars aligned on).

You can check the existing code here, and search in the browser for ':A'.

github.com/indilib/indi/blob/master/libi...ope/lx200_OnStep.cpp

All what :AW# does is write the align model to EEPROM. I don't know if this should be done every time after an align, or on demand. Maybe it has to do with Parking, when the mount is in an observatory, and hence no need to align every night. Don't know. A good question for Howard, and how the Android App does it (does it issue AW every time, or not). Whatever it is, the current code for INDI OnStep does not do it.

Even if it is required, it is not a big deal to change my patch so it is like this:
if ((alignNumStars == alignThisStar) && (meridianFlip == MeridianFlipAlign)) {
 meridianFlip=MeridianFlipNever;
 saveAlignModel();
}

That is all.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 1 month ago

azwing wrote: - I don't kow how to take PR as a diff and apply it to Alpha (may be you can help here)


Attached is a patch for the plate solve align.

To apply use:

patch -p1 --dry-run < /path-to/onstep-plate-solve-align.txt

Ignore the hunk offset message.

- Seems that what James changed in the alignment code broke the existing alignment code so I have first to sort out what happens here


From what James said previously, the new plate solve alignment code in INDI would not be needed if the OnStep patch above is verified to work (which it did for me).

James, can you please confirm that this is the case?

- I had to modify "Pins.Classic.h" to include definition of "Axis4_EN" to compile Alpha for Arduino Mega with Focuser support (Axis4_EN' was not declared in this scope)


I don't have RAMPS, so can't comment.

Read More...

Khalid replied to the topic 'Driver OnStep (LX200 like) for INDI' in the forum. 2 months ago

@azwing

The Mega should work. The only limitation I saw Howard warning about is the number of stars in alignment, and sluggish response when calculating the alignments.

So stick to 3 star alignment only (at least for a start), and see if that works for you. Also don't be surprised if there are timeouts on 4th or subsequent stars.

Read More...

Login

3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!