After some review in Onstep firmware I think there is no way to sync the focuser in a arbitrary position without modifying Onstep firmware.
All the Onstep Focuser1 commands are here (
Driver supported):
=====================================================
// :FA# Active?
// :FAn# Select focuser 1 or 2
// :F+# Move focuser in (toward objective)
// :F-# Move focuser out (away from objective)
// :FQ# Stop the focuser
// :FG# Get focuser current position (in microns)
// :FI# Get full in position (in microns)
// :FM# Get max position (in microns)
// :FT# get status
// :FZ# Set focuser position as zero
// :FH# Set focuser position as half-travel
// :FF# Set focuser for fast motion (1mm/s)
// :FP# Get focuser DC Motor Power Level (in %)
// :FPnnn# Set focuser DC Motor Power Level (in %)
// :Fp# Check for focuser pseudo absolute mode
// :FRsnnn# Set focuser target position relative (in microns)
// :FS# Set focuser for slow motion (0.01mm/s)
// :FSsnnn# Set focuser target position (in microns)
// :Fn# Movement rate, 1=finest, 2=0.01mm/second, 3=0.1mm/second, 4=1mm/second
=====================================================
Set an arbitrary position without moving the focuser:
With OnStep we can only set to 0 (:FZ) or half-travel (:FH) but not any other position.
If we would want to add
SyncFocuser
Onstep firmware should be modified.
Should we ask to Howard for a change?
Use relative negative movements: // :FSsnnn# Set focuser target position (in microns)
As per Jasem's
answer
this would break Indi/Ekos since all setpoints for movement / position are defined as (unint), see
Focuser Interface
I would be possible to calculate an offset if the returned range (:FI and :FM return values ) is -25000 to + 25000 and present a 0 to 50000 to Indi but this would create even more confusion.
I still don't see a solution here.
Set focuser Speed:
This could be supported by
SetFocuserSpeed
I presume provided we override the function to deduce the :Fn# arguments (1, 2, 3, 4) from a 0/100% saying 0-25 = 1, 26 to 50= 2 51 to 75=3 and 76 to 100=4 for example.