hjd1964 / OnStep

Arduino telescope goto for equatorial and alt/az mounts
http://www.stellarjourney.com/index.php?r=site/equipment_onstep
GNU General Public License v3.0
452 stars 167 forks source link

MaxRate_LowerLimit missing from STM32 HAL #106

Closed kbahey closed 5 years ago

kbahey commented 5 years ago

Howard,

The latest Alpha is missing a define for the lower limit for Max Rate

I added this to make it compile:

`` // Lower limit (fastest) step rate in uS for this platform

define MaxRate_LowerLimit 16

``

But not sure if 16 is suitable with the new fractionals.

We are sure that 20 works without mode switching.

kbahey commented 5 years ago

:GX92 and :GX93 both return 20, no matter what speed adjustment buttons I press (faster/slower).

hjd1964 commented 5 years ago

Normal.... for GX93. GX92 should change.

hjd1964 commented 5 years ago

Ok... I see it. Working on it.

hjd1964 commented 5 years ago

Try it now.

kbahey commented 5 years ago

That works. With microsteps 16 and no MICROSTEPS_GOTO, it is 1.7 deg/sec.

It can go slower, but not faster, as it should.

If they want both slower and faster, they have to select a mid range DesiredBaseSlewRate (which was 5.0, too high intentionally).

That part is perfect.

With mode switching enabled (as I have used the mount from day 1), microsteps set to 1/16, MICROSTEPS_GOTO set to 1/4, and desired rate 2.2 deg/sec (close to the 2.17 from the spreadsheet), Default is now 2.2 (same as desired), and Fastest is at 4.1 d/s, and Faster 3.3 d/s.

:GX99 is 8.5, is that right? How is that calculated with 1/4 and 20? Is it 20/4, that is not 8.5 us, rather 5 us?

Not a bug per se, just reporting the calculations in case they are not what you intended.

hjd1964 commented 5 years ago

Extra mode switching code in the ISR's so I call them 1.7x slower. This might change in the future I really don't know exactly how much slower and if its consistent across the various platforms.

So it's 5us * 1.7 =

kbahey commented 5 years ago

Okay. Busy today. So will test over the weekend my configuration with DesiredBaseSlewRate with the mount and motors to see how it all goes.

kbahey commented 5 years ago

I was able to test quickly on the mount. With 1/16 and 1/4 microsteps slewing, and 3.0 desired slew rate.

Worked perfectly. No skipped steps. Slewed west of meridian then east of it, then returned home, and index marks were aligned.

Great improvement. Looking forward to the spreadsheet changes to match.