Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On step work #1942

Merged
merged 158 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
17c6efd
Allowing Meridian Flip Limits East and West -180 .. 180
azwing Jan 26, 2022
aafa893
setup version
azwing Jan 26, 2022
a5b5fa9
defaut Meridian Value to -20 West / +20 East
azwing Jan 27, 2022
6861f61
Merge branch 'indilib:master' into master
azwing Jan 30, 2022
efee44d
Merge branch 'indilib:master' into master
azwing Jan 31, 2022
2c387e3
Merge branch 'indilib:master' into master
azwing Feb 8, 2022
ea4a108
Merge branch 'indilib:master' into master
azwing Feb 11, 2022
cf69f05
Merge branch 'indilib:master' into master
azwing Feb 16, 2022
bbaf597
Merge branch 'indilib:master' into master
azwing Feb 18, 2022
0474436
Merge branch 'indilib:master' into master
azwing Feb 19, 2022
c57ab4b
Merge branch 'indilib:master' into master
azwing Feb 22, 2022
563d2b6
Merge branch 'indilib:master' into master
azwing Feb 24, 2022
072c580
Merge branch 'indilib:master' into master
azwing Feb 28, 2022
4e48fa7
Merge branch 'indilib:master' into master
azwing Mar 3, 2022
71e99fc
Merge branch 'indilib:master' into master
azwing Mar 6, 2022
fe57560
Merge branch 'indilib:master' into master
azwing Mar 8, 2022
39cdf06
Merge branch 'indilib:master' into master
azwing Mar 10, 2022
d6026e2
Merge branch 'indilib:master' into master
azwing Mar 11, 2022
e242616
Merge branch 'indilib:master' into master
azwing Mar 13, 2022
16ced7e
Merge branch 'indilib:master' into master
azwing Mar 15, 2022
ebfc278
Fixed setUTCOffset to Onstep formt :SG[sHH]#
azwing Mar 18, 2022
42abb84
fix after change in lx200driver.cpp and fix to have UTC hh:00, hh:30,…
azwing Mar 19, 2022
4a2732e
fix negtives UTC Offsets
azwing Mar 20, 2022
3693ee2
Merge branch 'indilib:master' into master
azwing Mar 21, 2022
5233ee1
Merge branch 'indilib:master' into master
azwing Mar 25, 2022
62050a0
Merge branch 'indilib:master' into master
azwing Mar 28, 2022
cfe2414
Merge branch 'indilib:master' into master
azwing Mar 31, 2022
8277539
Merge branch 'indilib:master' into master
azwing Apr 1, 2022
0481563
Merge branch 'indilib:master' into master
azwing Apr 3, 2022
9ade76d
fixed UTC uninitialized structure tahnks Norikyu
azwing Apr 3, 2022
bdde9d9
Merge branch 'indilib:master' into master
azwing Apr 3, 2022
af78fd4
Merge branch 'indilib:master' into master
azwing Apr 8, 2022
c2200a0
Merge branch 'indilib:master' into master
azwing Apr 9, 2022
a823154
Merge branch 'indilib:master' into master
azwing Apr 13, 2022
8bdf021
Merge branch 'indilib:master' into master
azwing May 6, 2022
d6ec821
Merge branch 'indilib:master' into master
azwing May 7, 2022
a47d8f9
Merge branch 'indilib:master' into master
azwing May 20, 2022
98c18e4
Merge branch 'indilib:master' into master
azwing May 22, 2022
ad8af0a
Merge branch 'indilib:master' into master
azwing May 28, 2022
cde47d5
Merge branch 'indilib:master' into master
azwing May 29, 2022
db8737c
Merge branch 'indilib:master' into master
azwing Jun 6, 2022
0b3f240
Merge branch 'indilib:master' into master
azwing Jun 12, 2022
4398000
Merge branch 'indilib:master' into master
azwing Jun 18, 2022
a9e2ab6
Merge branch 'indilib:master' into master
azwing Jun 20, 2022
c1b2b44
Merge branch 'indilib:master' into master
azwing Jun 21, 2022
cba54d2
Merge branch 'indilib:master' into master
azwing Jun 22, 2022
37ddab5
Merge branch 'indilib:master' into master
azwing Jun 24, 2022
65ed231
Merge branch 'indilib:master' into master
azwing Jun 25, 2022
d7f4f74
Merge branch 'indilib:master' into master
azwing Jun 26, 2022
343ac24
Merge branch 'indilib:master' into master
azwing Jun 27, 2022
74d6cc0
Merge branch 'indilib:master' into master
azwing Jul 2, 2022
76f771b
Merge branch 'indilib:master' into master
azwing Jul 2, 2022
c6dcbcf
Merge branch 'indilib:master' into master
azwing Jul 3, 2022
9af3f1c
Merge branch 'indilib:master' into master
azwing Jul 6, 2022
a3f6ab3
Merge branch 'indilib:master' into master
azwing Jul 7, 2022
cb95352
Merge branch 'indilib:master' into master
azwing Jul 9, 2022
dbba875
Merge branch 'indilib:master' into master
azwing Jul 12, 2022
96b2deb
Merge branch 'indilib:master' into master
azwing Jul 14, 2022
a3c738f
Merge branch 'indilib:master' into master
azwing Jul 17, 2022
1b5bd2e
Merge branch 'indilib:master' into master
azwing Jul 20, 2022
2d4f4d3
Merge branch 'indilib:master' into master
azwing Jul 21, 2022
7cb375e
Merge branch 'indilib:master' into master
azwing Jul 24, 2022
49ce1b6
Merge branch 'indilib:master' into master
azwing Jul 28, 2022
20514b9
Merge branch 'indilib:master' into master
azwing Aug 1, 2022
69bb648
Merge branch 'indilib:master' into master
azwing Aug 2, 2022
e18957d
Merge branch 'indilib:master' into master
azwing Aug 6, 2022
063974a
Merge branch 'indilib:master' into master
azwing Aug 12, 2022
ea382d7
Merge branch 'indilib:master' into master
azwing Aug 13, 2022
d29aa1c
Merge branch 'indilib:master' into master
azwing Aug 15, 2022
1562b41
Merge branch 'indilib:master' into master
azwing Aug 19, 2022
1207fd5
Merge branch 'indilib:master' into master
azwing Aug 23, 2022
b091f4c
Merge branch 'indilib:master' into master
azwing Aug 25, 2022
0d9cb68
Merge branch 'indilib:master' into master
azwing Aug 28, 2022
ad2ddc9
Merge branch 'indilib:master' into master
azwing Sep 3, 2022
d121f37
Merge branch 'indilib:master' into master
azwing Sep 9, 2022
7771b42
Merge branch 'indilib:master' into master
azwing Sep 10, 2022
a096bc1
Merge branch 'indilib:master' into master
azwing Sep 15, 2022
d515313
Merge branch 'indilib:master' into master
azwing Sep 18, 2022
5b38373
Merge branch 'indilib:master' into master
azwing Sep 25, 2022
77d070e
Merge branch 'indilib:master' into master
azwing Sep 27, 2022
0a8a851
Merge branch 'indilib:master' into master
azwing Oct 1, 2022
817d8a9
Merge branch 'indilib:master' into master
azwing Oct 9, 2022
f582ca5
Merge branch 'indilib:master' into master
azwing Oct 10, 2022
015fbdd
Merge branch 'indilib:master' into master
azwing Oct 31, 2022
85f06d5
Merge branch 'indilib:master' into master
azwing Nov 5, 2022
a24805c
Merge branch 'indilib:master' into master
azwing Nov 6, 2022
b9f9137
Merge branch 'indilib:master' into master
azwing Nov 9, 2022
b6d3c23
OnStep 1.17 minor fix
azwing Nov 9, 2022
4be24e3
Merge branch 'indilib:master' into master
azwing Nov 10, 2022
a7b1da5
Merge branch 'indilib:master' into master
azwing Nov 14, 2022
d327db0
Merge branch 'indilib:master' into master
azwing Nov 15, 2022
3ddaab7
Merge branch 'indilib:master' into master
azwing Nov 20, 2022
dd0d0eb
Merge branch 'indilib:master' into master
azwing Nov 21, 2022
01b8f4c
Merge branch 'indilib:master' into master
azwing Nov 27, 2022
819af16
Merge branch 'indilib:master' into master
azwing Nov 29, 2022
a492313
Merge branch 'indilib:master' into master
azwing Nov 30, 2022
34c7a52
Merge branch 'indilib:master' into master
azwing Dec 1, 2022
a222832
Merge branch 'indilib:master' into master
azwing Dec 3, 2022
6ff635a
Merge branch 'indilib:master' into master
azwing Dec 6, 2022
dd469f6
Merge branch 'indilib:master' into master
azwing Dec 12, 2022
1ad5b62
Merge branch 'indilib:master' into master
azwing Dec 14, 2022
4ecae99
Merge branch 'indilib:master' into master
azwing Dec 15, 2022
d9918c1
Merge branch 'indilib:master' into master
azwing Dec 16, 2022
dc4ce72
Merge branch 'indilib:master' into master
azwing Dec 17, 2022
d862f50
Merge branch 'indilib:master' into master
azwing Dec 19, 2022
cd9d88b
Merge branch 'indilib:master' into master
azwing Dec 21, 2022
a23a73b
Merge branch 'indilib:master' into master
azwing Dec 23, 2022
82b42a9
Merge branch 'indilib:master' into master
azwing Jan 11, 2023
12bebc2
Onstep
azwing Jan 11, 2023
4271bde
Merge branch 'master' of https://github.com/azwing/indi
azwing Jan 11, 2023
4ea10ad
Onstep
azwing Jan 11, 2023
81fd90a
Merge branch 'indilib:master' into master
azwing Jan 17, 2023
4e02b8d
Merge branch 'master' of https://github.com/azwing/indi
azwing Jan 17, 2023
505f411
Merge branch 'indilib:master' into master
azwing Feb 7, 2023
b4f3497
Merge branch 'master' of https://github.com/azwing/indi
azwing Feb 7, 2023
1ecefcf
Merge branch 'indilib:master' into master
azwing Feb 26, 2023
6f89eab
Merge branch 'master' of https://github.com/azwing/indi
azwing Feb 26, 2023
91af896
Implemented Focuser Temperature Compensation
azwing Feb 27, 2023
663a709
Fixed Focuser T° Compensation
azwing Feb 28, 2023
6d1d048
removed unused properties causing undefined defNumberVector
azwing Mar 3, 2023
e043a93
Merge branch 'indilib:master' into master
azwing Mar 6, 2023
a0c11f6
Merge branch 'indilib:master' into master
azwing Mar 9, 2023
3b3c326
Merge branch 'indilib:master' into master
azwing Mar 11, 2023
9859a42
Merge branch 'indilib:master' into master
azwing Mar 14, 2023
1368d90
Merge branch 'indilib:master' into master
azwing Mar 19, 2023
b5b13cc
Merge branch 'indilib:master' into master
azwing Mar 24, 2023
b143146
Fixed minor bugs and typo
azwing Mar 26, 2023
21a3d71
Merge branch 'indilib:master' into master
azwing Mar 26, 2023
3c8a7f3
fix minor bugs and typo
azwing Mar 26, 2023
e593c3e
minor fixes
azwing Mar 27, 2023
5da7f39
Merge branch 'indilib:master' into master
azwing Mar 27, 2023
dfad34e
Merge branch 'indilib:master' into master
azwing Mar 30, 2023
f254c70
Merge branch 'indilib:master' into master
azwing Apr 5, 2023
ee9db21
Merge branch 'indilib:master' into master
azwing Apr 14, 2023
44334e9
Merge branch 'indilib:master' into master
azwing Apr 24, 2023
412bdf4
Merge branch 'indilib:master' into master
azwing Jul 6, 2023
6d8af94
Merge branch 'indilib:master' into master
azwing Jul 12, 2023
be8dbf4
Merge branch 'indilib:master' into master
azwing Jul 29, 2023
b0380c5
Merge branch 'indilib:master' into master
azwing Aug 1, 2023
164406f
Merge branch 'indilib:master' into master
azwing Aug 4, 2023
7f887e0
Merge branch 'indilib:master' into master
azwing Aug 10, 2023
1ac1db0
Merge branch 'indilib:master' into master
azwing Aug 15, 2023
afb0869
Merge branch 'indilib:master' into master
azwing Aug 26, 2023
1f75555
Merge branch 'indilib:master' into master
azwing Aug 28, 2023
821e6d2
Merge branch 'indilib:master' into master
azwing Sep 2, 2023
b08bf0d
Merge branch 'indilib:master' into master
azwing Sep 9, 2023
590fac2
Merge branch 'indilib:master' into master
azwing Sep 10, 2023
1eb13b8
Merge branch 'indilib:master' into master
azwing Sep 14, 2023
e9662a4
Merge branch 'indilib:master' into master
azwing Sep 17, 2023
d4b51d3
Merge branch 'indilib:master' into master
azwing Sep 21, 2023
e3f206c
fixes OnStepX :Ft# and :GX98#
azwing Sep 23, 2023
0214dac
fixed Focuser Temperature in Ekos
azwing Sep 25, 2023
5394d03
fixed FOCUS_TEMPERATURE Property name
azwing Sep 25, 2023
d805c05
Weather and Focus T° fixes
azwing Sep 25, 2023
74f4ea3
Merge branch 'indilib:master' into OnStep_Work
azwing Sep 25, 2023
12d1114
version 1.20
azwing Sep 25, 2023
1354153
clean up version 1.20
azwing Sep 28, 2023
3f5f352
Merge branch 'indilib:master' into OnStep_Work
azwing Sep 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</device>
<device label="LX200 OnStep" manufacturer="OnStep">
<driver name="LX200 OnStep">indi_lx200_OnStep</driver>
<version>1.19</version>
<version>1.20</version>
</device>
<device label="LX200 OpenAstroTech" manufacturer="OpenAstroTech">
<driver name="LX200 OpenAstroTech">indi_lx200_OpenAstroTech</driver>
Expand Down
86 changes: 55 additions & 31 deletions drivers/telescope/lx200_OnStep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ LX200_OnStep::LX200_OnStep() : LX200Generic(), WI(this), RotatorInterface(this)
currentCatalog = LX200_STAR_C;
currentSubCatalog = 0;

setVersion(1, 19); // don't forget to update libindi/drivers.xml
setVersion(1, 20); // don't forget to update libindi/drivers.xml

setLX200Capability(LX200_HAS_TRACKING_FREQ | LX200_HAS_SITES | LX200_HAS_ALIGNMENT_TYPE | LX200_HAS_PULSE_GUIDING |
LX200_HAS_PRECISE_TRACKING_FREQ);
Expand Down Expand Up @@ -114,17 +114,22 @@ bool LX200_OnStep::initProperties()

IUFillNumber(&ElevationLimitN[0], "minAlt", "Elev Min", "%g", -30, 30, 1, -30);
IUFillNumber(&ElevationLimitN[1], "maxAlt", "Elev Max", "%g", 60, 90, 1, 89);
IUFillNumberVector(&ElevationLimitNP, ElevationLimitN, 2, getDeviceName(), "Slew elevation Limit", "", MAIN_CONTROL_TAB,
IUFillNumberVector(&ElevationLimitNP, ElevationLimitN, 2, getDeviceName(), "Slew elevation Limit", "", MAIN_CONTROL_TAB,
IP_RW, 0, IPS_IDLE);

IUFillText(&ObjectInfoT[0], "Info", "", "");
IUFillTextVector(&ObjectInfoTP, ObjectInfoT, 1, getDeviceName(), "Object Info", "", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE);
IUFillTextVector(&ObjectInfoTP, ObjectInfoT, 1, getDeviceName(), "Object Info", "", MAIN_CONTROL_TAB,
IP_RO, 0, IPS_IDLE);

// ============== COMMUNICATION_TAB

// ============== CONNECTION_TAB

// ============== OPTION_TAB
// ============== OPTIONS_TAB

// ============== FILTER_TAB

// ============== MOTION_CONTROL_TAB
// ============== MOTION_TAB
//Override the standard slew rate command. Also add appropriate description. This also makes it work in Ekos Mount Control correctly
//Note that SlewRateSP and MaxSlewRateNP BOTH track the rate. I have left them in there because MaxRateNP reports OnStep Values
uint8_t nSlewRate = 10;
Expand All @@ -145,7 +150,8 @@ bool LX200_OnStep::initProperties()
IP_RW, ISR_1OFMANY, 0, IPS_IDLE);

IUFillNumber(&MaxSlewRateN[0], "maxSlew", "Rate", "%f", 0.0, 9.0, 1.0, 5.0); //2.0, 9.0, 1.0, 9.0
IUFillNumberVector(&MaxSlewRateNP, MaxSlewRateN, 1, getDeviceName(), "Max slew Rate", "", MOTION_TAB, IP_RW, 0, IPS_IDLE);
IUFillNumberVector(&MaxSlewRateNP, MaxSlewRateN, 1, getDeviceName(), "Max slew Rate", "", MOTION_TAB,
IP_RW, 0, IPS_IDLE);

IUFillSwitch(&TrackCompS[0], "1", "Full Compensation", ISS_OFF);
IUFillSwitch(&TrackCompS[1], "2", "Refraction", ISS_OFF);
Expand Down Expand Up @@ -200,8 +206,10 @@ bool LX200_OnStep::initProperties()
IUFillNumberVector(&minutesPastMeridianNP, minutesPastMeridianN, 2, getDeviceName(), "Minutes Past Meridian",
"Minutes Past Meridian", MOTION_TAB, IP_RW, 0, IPS_IDLE);


// ============== DATETIME_TAB

// ============== SITE_MANAGEMENT_TAB
// ============== SITE_TAB
IUFillSwitch(&SetHomeS[0], "RETURN_HOME", "Return Home", ISS_OFF);
IUFillSwitch(&SetHomeS[1], "AT_HOME", "At Home (Reset)", ISS_OFF);
IUFillSwitchVector(&SetHomeSP, SetHomeS, 2, getDeviceName(), "HOME_INIT", "Homing", SITE_TAB, IP_RW, ISR_ATMOST1, 60,
Expand All @@ -217,17 +225,19 @@ bool LX200_OnStep::initProperties()
// IUFillSwitch(&OSFocus1InitializeS[2], "Focus1_3", "max", ISS_OFF);
IUFillSwitchVector(&OSFocus1InitializeSP, OSFocus1InitializeS, 2, getDeviceName(), "Foc1Rate", "Initialize", FOCUS_TAB,
IP_RW, ISR_ATMOST1, 0, IPS_IDLE);
// Focus T° Compensation
IUFillNumber(&FocuserTN[0], "TFC T°", "TFC T°", "%+2.2f", 0, 1, 0.25, 25); //default value is meaningless
IUFillNumber(&FocuserTN[1], "TFC Diff T°", "TFC Diff T°", "%+2.2f", 0, 1, 0.25, 25); //default value is meaningless
IUFillNumberVector(&FocuserTNP, FocuserTN, 2, getDeviceName(), "TFC T°", "TFC T°", FOCUS_TAB, IP_RO, 0,
// Focus T° Compensation
// Property must be FOCUS_TEMPERATURE to be recognized by Ekos
IUFillNumber(&FocusTemperatureN[0], "FOCUS_TEMPERATURE", "TFC T°", "%+2.2f", 0, 1, 0.25, 25); //default value is meaningless
IUFillNumber(&FocusTemperatureN[1], "TFC Δ T°", "TFC Δ T°", "%+2.2f", 0, 1, 0.25, 25); //default value is meaningless
IUFillNumberVector(&FocusTemperatureNP, FocusTemperatureN, 2, getDeviceName(), "FOCUS_TEMPERATURE", "Focuser T°", FOCUS_TAB, IP_RO, 0,
IPS_IDLE);
IUFillSwitch(&TFCCompensationS[0], "Off", "Compensation: OFF", ISS_OFF);
IUFillSwitch(&TFCCompensationS[1], "On", "Compensation: ON", ISS_OFF);
IUFillSwitchVector(&TFCCompensationSP, TFCCompensationS, 2, getDeviceName(), "Compensation T°", "Temperature Compensation", FOCUS_TAB, IP_RW,
ISR_1OFMANY, 0, IPS_IDLE);
IUFillNumber(&TFCCoefficientN[0], "TFC Coeeficient", "TFC Coefficient µm/°C", "%+03.5f", -999.99999, 999.99999, 1, 100);
IUFillNumberVector(&TFCCoefficientNP, TFCCoefficientN, 1, getDeviceName(), "TFC Coeeficient", "", FOCUS_TAB, IP_RW, 0, IPS_IDLE);

IUFillNumber(&TFCCoefficientN[0], "TFC Coefficient", "TFC Coefficient µm/°C", "%+03.5f", -999.99999, 999.99999, 1, 100);
IUFillNumberVector(&TFCCoefficientNP, TFCCoefficientN, 1, getDeviceName(), "TFC Coefficient", "", FOCUS_TAB, IP_RW, 0, IPS_IDLE);
IUFillNumber(&TFCDeadbandN[0], "TFC Deadband", "TFC Deadband µm", "%g", 1, 32767, 1, 5);
IUFillNumberVector(&TFCDeadbandNP, TFCDeadbandN, 1, getDeviceName(), "TFC Deadband", "", FOCUS_TAB, IP_RW, 0, IPS_IDLE);
// End Focus T° Compensation
Expand Down Expand Up @@ -310,7 +320,7 @@ bool LX200_OnStep::initProperties()
// IUFillSwitch(&OSPECReadS[2], "Write to EEPROM", "Write to EEPROM", ISS_OFF);
IUFillSwitchVector(&OSPECReadSP, OSPECReadS, 2, getDeviceName(), "PEC File", "PEC File", PEC_TAB, IP_RW, ISR_ATMOST1, 0,
IPS_IDLE);
// ============== New ALIGN_TAB
// ============== ALIGNMENT_TAB
// Only supports Alpha versions currently (July 2018) Now Beta (Dec 2018)
IUFillSwitch(&OSNAlignStarsS[0], "1", "1 Star", ISS_OFF);
IUFillSwitch(&OSNAlignStarsS[1], "2", "2 Stars", ISS_OFF);
Expand Down Expand Up @@ -357,6 +367,8 @@ bool LX200_OnStep::initProperties()
// IUFillText(&OSNAlignErrT[6], "6", "Current Star", "Not Updated");
// IUFillText(&OSNAlignErrT[7], "7", "# of Align Stars", "Not Updated");
IUFillTextVector(&OSNAlignErrTP, OSNAlignErrT, 2, getDeviceName(), "ErrAlign Process", "", ALIGN_TAB, IP_RO, 0, IPS_IDLE);

// =============== INFO_TAB

#ifdef ONSTEP_NOTDONE
// =============== OUTPUT_TAB
Expand Down Expand Up @@ -504,7 +516,7 @@ bool LX200_OnStep::updateProperties()
OSFocuser1 = true;
defineProperty(&OSFocus1InitializeSP);
// Focus T° Compensation
defineProperty(&FocuserTNP);
defineProperty(&FocusTemperatureNP);
defineProperty(&TFCCompensationSP);
defineProperty(&TFCCoefficientNP);
defineProperty(&TFCDeadbandNP);
Expand Down Expand Up @@ -586,7 +598,7 @@ bool LX200_OnStep::updateProperties()

//Rotation Information
char rotator_response[RB_MAX_LEN] = {0};
error_or_fail = getCommandSingleCharErrorOrLongResponse(PortFD, rotator_response, ":GX98#");
error_or_fail = getCommandSingleCharResponse(PortFD, rotator_response, ":GX98#");
if (error_or_fail > 0)
{
if (rotator_response[0] == 'D' || rotator_response[0] == 'R')
Expand All @@ -599,12 +611,17 @@ bool LX200_OnStep::updateProperties()
{
defineProperty(&OSRotatorDerotateSP);
}
if (rotator_response[0] == '0')
{
OSRotator1 = false;
}
}
else
{
LOGF_WARN("Error: %i", error_or_fail);
LOG_WARN("Error on response to rotator check (:GX98#) CHECK CONNECTION");
}
//=================

if (OSRotator1 == false)
{
Expand Down Expand Up @@ -715,7 +732,7 @@ bool LX200_OnStep::updateProperties()

// Focuser
// Focuser 1
deleteProperty(FocuserTNP.name);
deleteProperty(FocusTemperatureNP.name);
deleteProperty(OSFocus1InitializeSP.name);
deleteProperty(TFCCoefficientNP.name);
deleteProperty(TFCDeadbandNP.name);
Expand Down Expand Up @@ -1137,6 +1154,7 @@ bool LX200_OnStep::ISNewNumber(const char *dev, const char *name, double values[
snprintf(cmd, 15, ":SX9A,%d#", (int)values[0]);
sendOnStepCommandBlind(cmd);
OSSetTemperatureNP.s = IPS_OK;
OSSetTemperatureN[0].value=values[0];
IDSetNumber(&OSSetTemperatureNP, "Temperature set to %d", (int)values[0]);
}
else
Expand All @@ -1156,6 +1174,7 @@ bool LX200_OnStep::ISNewNumber(const char *dev, const char *name, double values[
snprintf(cmd, 15, ":SX9C,%d#", (int)values[0]);
sendOnStepCommandBlind(cmd);
OSSetHumidityNP.s = IPS_OK;
OSSetHumidityN[0].value=values[0];
IDSetNumber(&OSSetHumidityNP, "Humidity set to %d", (int)values[0]);
}
else
Expand All @@ -1170,11 +1189,12 @@ bool LX200_OnStep::ISNewNumber(const char *dev, const char *name, double values[
{
char cmd[CMD_MAX_LEN] = {0};

if ((values[0] >= 0) && (values[0] <= 100))
if ((values[0] >= 500) && (values[0] <= 1100)) // typo
{
snprintf(cmd, 15, ":SX9B,%d#", (int)values[0]);
sendOnStepCommandBlind(cmd);
OSSetPressureNP.s = IPS_OK;
OSSetPressureN[0].value=values[0];
IDSetNumber(&OSSetPressureNP, "Pressure set to %d", (int)values[0]);
}
else
Expand All @@ -1196,7 +1216,7 @@ bool LX200_OnStep::ISNewNumber(const char *dev, const char *name, double values[
snprintf(cmd, 15, ":FC%+3.5f#", values[0]);
sendOnStepCommandBlind(cmd);
TFCCoefficientNP.s = IPS_OK;
IDSetNumber(&TFCCoefficientNP, "TFC Coeeficient set to %+3.5f", values[0]);
IDSetNumber(&TFCCoefficientNP, "TFC Coefficient set to %+3.5f", values[0]);
}
else
{
Expand Down Expand Up @@ -3058,6 +3078,7 @@ bool LX200_OnStep::ReadScopeStatus()
PreferredPierSideSP.s = IPS_OK;
IDSetSwitch(&PreferredPierSideSP, nullptr);
}
/* remove this dead code
else if (strstr(preferredpierside_response, "%"))
{
//NOTE: This bug is only present in very early OnStepX, and should be fixed shortly after 10.03k
Expand All @@ -3066,6 +3087,7 @@ bool LX200_OnStep::ReadScopeStatus()
PreferredPierSideSP.s = IPS_ALERT;
IDSetSwitch(&PreferredPierSideSP, nullptr);
}
*/
else
{
IUResetSwitch(&PreferredPierSideSP);
Expand Down Expand Up @@ -3212,7 +3234,7 @@ bool LX200_OnStep::ReadScopeStatus()
char cputemp_reponse[RB_MAX_LEN] = {0};
double cputemp_value;
int error_return = getCommandDoubleResponse(PortFD, &cputemp_value, cputemp_reponse, ":GX9F#");
if ( error_return >= 0 && !strcmp(cputemp_reponse, "0") )
if ( error_return >= 0) // && !strcmp(cputemp_reponse, "0") )
{
setParameterValue("WEATHER_CPU_TEMPERATURE", cputemp_value);
}
Expand Down Expand Up @@ -3863,6 +3885,7 @@ int LX200_OnStep::OSUpdateFocuser()
IDSetNumber(&FocusAbsPosNP, nullptr);
LOGF_DEBUG("Current focuser: %d, %f", value_int, FocusAbsPosN[0].value);
}

// :FT# get status
// Returns: M# (for moving) or S# (for stopped)
char valueStatus[RB_MAX_LEN] = {0};
Expand Down Expand Up @@ -3902,6 +3925,7 @@ int LX200_OnStep::OSUpdateFocuser()
FocusAbsPosNP.s = IPS_ALERT;
IDSetNumber(&FocusAbsPosNP, nullptr);
}

// :FM# Get max position (in microns)
// Returns: n#
char focus_max[RB_MAX_LEN] = {0};
Expand All @@ -3920,6 +3944,7 @@ int LX200_OnStep::OSUpdateFocuser()
LOGF_WARN("focus_max: %s, %u, fm_error: %i", focus_max, focus_max[0], fm_error);
flushIO(PortFD); //Unlikely to do anything, but just in case.
}

// :FI# Get full in position (in microns)
// Returns: n#
char focus_min[RB_MAX_LEN] = {0};
Expand All @@ -3937,34 +3962,34 @@ int LX200_OnStep::OSUpdateFocuser()
LOG_WARN("Communication :FI# error, check connection.");
flushIO(PortFD); //Unlikely to do anything, but just in case.
}

// Focus T° Compensation

// :Ft# Get Focuser Temperature
// Returns: n#
char focus_T[RB_MAX_LEN] = {0};
int focus_T_int ;
int ft_error = getCommandIntResponse(PortFD, &focus_T_int, focus_T, ":Ft#");
double focus_T_double ;
int ft_error = getCommandDoubleResponse(PortFD, &focus_T_double, focus_T, ":Ft#");
if (ft_error > 0)
{
FocuserTN[0].value = atof(focus_T);
IDSetNumber(&FocuserTNP, nullptr);
LOGF_DEBUG("focus T°: %s, %i ft_nbcar: %i", focus_T, focus_T_int, ft_error); //typo
FocusTemperatureN[0].value = atof(focus_T);
IDSetNumber(&FocusTemperatureNP, nullptr);
LOGF_DEBUG("focus T°: %s, focus_T_double %i ft_nbcar: %i", focus_T, focus_T_double, ft_error);
}
else
{
LOG_WARN("Communication :Ft# error, check connection.");
LOGF_DEBUG("focus T°: %s, focus_T_double %i ft_nbcar: %i", focus_T, focus_T_double, ft_error);
flushIO(PortFD); //Unlikely to do anything, but just in case.
}

// :Fe# Get Focus Differential T°
// Returns: n#
char focus_TD[RB_MAX_LEN] = {0};
int focus_TD_int ;
int fe_error = getCommandIntResponse(PortFD, &focus_TD_int, focus_TD, ":Fe#");
if (fe_error > 0)
{
FocuserTN[1].value = atof(focus_TD);
IDSetNumber(&FocuserTNP, nullptr);
FocusTemperatureN[1].value = atof(focus_TD);
IDSetNumber(&FocusTemperatureNP, nullptr);
LOGF_DEBUG("focus Differential T°: %s, %i fi_nbchar: %i", focus_TD, focus_TD_int, fe_error);
}
else
Expand Down Expand Up @@ -4034,7 +4059,6 @@ int LX200_OnStep::OSUpdateFocuser()
LOG_WARN("Communication :Fc# error, check connection.");
flushIO(PortFD); //Unlikely to do anything, but just in case.
}
// End Focus T° Compensation

FI::updateProperties();
LOGF_DEBUG("After update properties: FocusAbsPosN min: %f max: %f", FocusAbsPosN[0].min, FocusAbsPosN[0].max);
Expand Down
10 changes: 8 additions & 2 deletions drivers/telescope/lx200_OnStep.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
===========================================

Version not yet updated/No INDI release:
Version 1.20
- fixed wrong messages due to different return with OnStepX
- fixed Focuser Temerature not shown on Ekos
- fixed Weather settings (P/T/Hr) when no sensor present
- minor typos
Version 1.19
- fixed typo on debug information saying error instead of nbchar causing confusion
- fixed Autoflip Off update
Expand Down Expand Up @@ -325,8 +330,9 @@ class LX200_OnStep : public LX200Generic, public INDI::WeatherInterface, public
ISwitch OSFocus1InitializeS[4];

// Focus T° Compensation
INumberVectorProperty FocuserTNP;
INumber FocuserTN[2];
INumberVectorProperty FocusTemperatureNP;
INumber FocusTemperatureN[2];

ISwitchVectorProperty TFCCompensationSP;
ISwitch TFCCompensationS[2];
INumberVectorProperty TFCCoefficientNP;
Expand Down
Loading