SHC throught Serial2 can do manual axis moving?


vankarem77@...
 

Hi Howard, i cant move any axis with the SHC when is configured to work on Serial2, all other funtions seems work; conection status say Ok.
On the main Onstep firmware 4.24 i set ST4_HAND_CONTROL to OFF and ON but same result.
With the SHC configured to SerialST4 works Ok


Khalid Baheyeldin
 

There is no Serial2 for the SHC.

An SHC is designed to work with an ST4 port only, via a custom protocol.

You must have a board with an ST4 port, with a network resistor:

And you should have this in your Config.h:
#define ST4_HAND_CONTROL        ON

And one of the following, depending on your board:
#define ST4_INTERFACE           ON
Or:
#define ST4_INTERFACE           ON_PULLUP


vankarem77@...
 

Hi Khlaid, this is from v4.24;
#define SERIAL_INTERFACE        SerialST4 // Se..T4, SerialST4 for ST4 port sync comms, you can also use any other available  Infreq
                                                                         //  serial port (if pins are unused,) Serial3 for example, on the Teensy3.2

I tested to make sucessful conection throught SHC ESP32 Serial2 to OnStep ESP32 Serial D (InsteinESP1 board)
But cant move axis, only start tracking etc...


Khalid Baheyeldin
 

Oh, you mean on the addons/SmartHandController Config.h?

I never had to change that, ever.


Howard Dutton
 

It's a bug.  There are #define strings that get sent to start/stop the guide motion... those are special 1-char commands in SerialST4 (for speed) and need to revert to the standard commands when a normal Serial interface is present.  Really not a big deal to change the #defines but there is no easy way to use the pre-processor via #ifdef so it'd require added code to move the constants into strings at runtime when I can check to see what kind of Serial interface is present.

For now SmartController.h has the single char (byte) command #defines.  Pretty sure changing those to ":M_#" (start move) ":Q_#" (quit move) strings where _ is n,s,e,w would do the trick for you but wouldn't be universal and work optimally with the SerialST4.

I'll fix this when time allows, a week or two probably.


Howard Dutton
 
Edited

On Wed, Sep 8, 2021 at 06:53 AM, Howard Dutton wrote:
I'll fix this when time allows, a week or two probably.
Ok, a little faster than that, the main branch SHC has the fix now.  I didn't test (as I don't have an ESP32 SHC nor any SHC wired into OnStep that way) but the code is there and it should work.  It leans on the availableToWrite() call to identify if the Serial (Serial1, etc.) or SerialST4 interface is in use, returning 0 or >0 depending on which.  At that point the code copies the single byte commands or normal LX200 as needed.

https://github.com/hjd1964/SmartHandController/tree/main

Note this also has overhauled focuser code to support OnStepX, so there is some chance something there may be broken now, but probably not.


Drew 🔭📷🚴‍♂️
 

Howard,

Shouldn't Main become the default branch now?


Howard Dutton
 
Edited

On Sun, Sep 12, 2021 at 05:51 AM, Drew 🔭📷🚴‍♂️ wrote:
Shouldn't Main become the default branch now?
No.  I'm setting the default to the release as I feel it should be stable enough, if not will patch as needed.  It has all issues I know of patched, well there is the change to U8G2 breaking things but really my feeling on that is to document it and direct users to the old version for now.

The Main has some more serious changes WRT those focusers etc.


Drew 🔭📷🚴‍♂️
 

OK, I see the reasoning. But the term "Main" is a little confusing. Perhaps using "RC1"(Release Candidate 1) might be more useful. This would be useful in the other current repositories also.


Howard Dutton
 

On Sun, Sep 12, 2021 at 06:08 AM, Drew 🔭📷🚴‍♂️ wrote:
OK, I see the reasoning. But the term "Main" is a little confusing. Perhaps using "RC1"(Release Candidate 1) might be more useful. This would be useful in the other current repositories also.
That reminds me, I still needed to update the README for that Main branch SHC to describe the standard use of branches in my repositories...

https://github.com/hjd1964/SmartHandController/blob/main/README.md


Ken Hunter
 

Howard...

Would  you like to add that there is a 3rd ESP32 hardware design for use with an off the shelf commercial case?
I will be announcing my SHC, complete with case, coiled cord, latest firmware and tested for those without or not
desiring a 3D printed case as soon as I receive a few more reviews and comments from the field.

Ken