It seems to me this behaviour is frequent in other drivers and cannot be regarded as a bug nor an annoyance. In my opinion, there is no clear interest having this box filled out, as the value is already set in the left one at the connection.
Great thanks to the developer(s). I hope this driver will be included soon in the stable indi library.
Ok, here is what causes this behavior. If all drivers, you have updateProperties() function. In this function, we define or delete properties based on whether we are connecting or disconnecting.
If the properties are initialized _before_ we define them, then both the right and left fields in KStars would be equal. I just took a look at the driver code, and made changes so that values are read before we define them. I pushed the changes to master, please compile and retest.
I have just committed change for serial connection poll period to be specified from 1 - 30s.
Regards, the commit that fills in the max and abs "set" points to be the same as the actual values just seems wrong to me. I think the change should have been to make sure these fields always be zeroed on connection.
Also things like reverse direction, max step, temp comp. should also be on the options page, as they are options and probably only need setting once, but this would require overrides and so perhaps should be applied in the base class? The abort button should also be more accessible and obvious, possibly next option after Direction, or better still when the Abs or Relative Set buttons are pressed, they toggle to Abort buttons?
The next thing in my sights is "Home Position" and "Backlash", both of which I need to understand a bit more before implementing.
I saw that the auto focus control in Ekos has a backlash tick box and value, but they are greyed out. I do not know why I cannot access them, but if I could it negates having to do it in the focuser driver?
I am nervous about implementing "Home Position" as I do not understand the logic behind it yet. Is it a button that triggers the focuser to move toward zero until the switch input is seen? If so is there any protection against just endlessly driving the focuser in, perhaps because the switch has fallen off, or does it get to maybe -10 and then stop, as a safety measure? Or is it just an option , that if selected causes the focuser to do the same as already described but on startup?
If Robert does not respond in this thread I will ask in his forums.
In myFocuserPro2, home position is a method of going to position 0.
If no hardware switch is fitted, the focuser will stop when the focuser position is 0.
If a hardware switch is implemented, then myfocuserpro2 firmware will manage and find the 0 position based on the switch value. And yes there are limits and methods in firmware to prevent endlessly winding the motor to oblivion. But INDI shouldnt really know about this, its in firmware and that is where it is managed.
Thus is any case the end result of HOME POSITION is ending up at position 0.
This does not need to be managed by INDI, in fact it would not be a good thing in my opinion. INDI should not be concerned with exactly how that is done.
In terms of backlash, there are two ways to look at this.
1. Let the client application handle it [disable backlash in the firmware]
2. Let the firmware handle it [enable backlash in the firmware]. In this case the application should not handle backlash else you have two competing methods fighting against it.
If backlash is enabled in firmware, it really does not need to be changed/altered that much over time. It is not like tommorrow one wakes up and backlash has suddenly halved or doubled. Once set it is remembered by the controller in EEPROM, thus retored when the controller boots.
So if one used windows or even a serial terminal to configure the backlash in firmware it will be remmebered and thus INI would not be required to remember it. It depends if you want to place that capability in the INDI driver or leave it to a client app to manage.
Thanks for the reply Robert. It was not my intention to code anything clever, keep things simple, all I want to do is send a command to either Enable/Disable home or one shot command to say go to home position. I will have a look at the code and see what I need to do.
I think I will tackle backlash next, and add two fields in options tab, Backlash In, Backlash Out (0-512 range). A value of zero will be treated as disable, and I will send a disable command for the given input, otherwise I will send an enable and the value for the given input.
A useful feature that maybe you could add is a single return value of a bit mask to show what features have been enabled on the focuser,
Display = 1
Temp Sensor = 2
Backlash = 4
so a value of 5 would mean has Display and Backlash but no temp sensor.
I could then potentially use this value to show or hide the associated controls. What do you think?
// GLOBAL DATA - DO NOT CHANGE
int Features = 0;
Features = Features + ENABLEDLCD;
Features = Features + ENABLEDOLED;
Features = Features + ENABLEDTEMPPROBE;
Features = Features + ENABLEDHPSW;
Features = Features + ENABLEDBLUETOOTH;
Features = Features + ENABLEDSTEPPERPWR;
Features = Features + ENABLEDPUSHBUTTONS;
Features = Features + ENABLEDROTARYENCODER;
Features = Features + ENABLEDINFRARED;
Features = Features + ENABLEDBACKLASH;
Features = Features + ENABLEDTFT;
Features = Features + ENABLENOKIA;
#if (DRVBRD == DRV8825HW203KEYPAD)
Features = Features + ENABLEKEYPAD;
Features = Features + ENABLEDINOUTLEDS;
Features = Features + ENABLEDBUZZER;
SendPacket('m' + String(Features) + '#');
That was prompt, I won't be coding that up for a while though! Might need some advice from knro on how to hide or show controls, or just get connection read feature map and use to display certain controls.
However I have just committed the Goto Home Position, and made a minor change to allow change of position during a move. I have not done a pull request yet, as I want to add backlash values tomorrow.
re - and made a minor change to allow change of position during a move.
In ASCOM the protocol is check isMoving property before a move. As the focuser would be moving such a call would be denied.
In the myfp2 firmware, this is replicated and new moves while the focuser is already moving are not allowed.