| 1 |
Description: new version of libahp-gt uses axis on more functions |
| 2 |
Index: indi-eqmod/ahpgtbase.cpp |
| 3 |
=================================================================== |
| 4 |
--- indi-eqmod.orig/ahpgtbase.cpp 2025-04-05 00:42:28.832301349 +0200 |
| 5 |
+++ indi-eqmod/ahpgtbase.cpp 2025-04-05 00:43:02.628299613 +0200 |
| 6 |
@@ -215,7 +215,7 @@ |
| 7 |
else |
| 8 |
GTMountConfigSP[GT_GEM].setState(ISS_ON); |
| 9 |
GTMountConfigSP.apply(); |
| 10 |
|
| 11 |
+ GTConfigurationNP[GT_PWM_FREQ].setValue(ahp_gt_get_pwm_frequency(0) * 700 + 1500); |
| 12 |
GTConfigurationNP.apply(); |
| 13 |
} |
| 14 |
else |
| 15 |
@@ -264,7 +264,8 @@ |
| 16 |
} |
| 17 |
if(!strcmp(GTConfigurationNP.getName(), name)) |
| 18 |
{ |
| 19 |
|
| 20 |
+ ahp_gt_set_pwm_frequency(0 ,(GTConfigurationNP[GT_PWM_FREQ].getValue() - 1500) / 700); |
| 21 |
+ ahp_gt_set_pwm_frequency(1 ,(GTConfigurationNP[GT_PWM_FREQ].getValue() - 1500) / 700); |
| 22 |
ahp_gt_write_values(0, &progress, &write_finished); |
| 23 |
ahp_gt_write_values(1, &progress, &write_finished); |
| 24 |
updateProperties(); |
| 25 |
@@ -285,12 +286,12 @@ |
| 26 |
case GT_GEM: |
| 27 |
ahp_gt_set_features(0, static_cast<SkywatcherFeature>(ahp_gt_get_features(0) & ~static_cast<int>(isAZEQ))); |
| 28 |
ahp_gt_set_features(1, static_cast<SkywatcherFeature>(ahp_gt_get_features(1) & ~static_cast<int>(isAZEQ))); |
| 29 |
|
| 30 |
+ ahp_gt_set_mount_flags(static_cast<GTFlags>(0)); |
| 31 |
break; |
| 32 |
case GT_AZEQ: |
| 33 |
ahp_gt_set_features(0, static_cast<SkywatcherFeature>(ahp_gt_get_features(0) | static_cast<int>(isAZEQ))); |
| 34 |
ahp_gt_set_features(1, static_cast<SkywatcherFeature>(ahp_gt_get_features(1) | static_cast<int>(isAZEQ))); |
| 35 |
|
| 36 |
+ ahp_gt_set_mount_flags(static_cast<GTFlags>(0)); |
| 37 |
break; |
| 38 |
case GT_FORK: |
| 39 |
ahp_gt_set_features(0, static_cast<SkywatcherFeature>(ahp_gt_get_features(0) & ~static_cast<int>(isAZEQ))); |
| 40 |
@@ -312,19 +313,19 @@ |
| 41 |
} |
| 42 |
if(!strcmp(GTRASteppingModeSP.getName(), name)) |
| 43 |
{ |
| 44 |
|
| 45 |
+ ahp_gt_set_stepping_mode(0, static_cast<GTSteppingMode>(GTRASteppingModeSP.findOnSwitchIndex())); |
| 46 |
ahp_gt_write_values(0, &progress, &write_finished); |
| 47 |
updateProperties(); |
| 48 |
} |
| 49 |
if(!strcmp(GTRAWindingSP.getName(), name)) |
| 50 |
{ |
| 51 |
|
| 52 |
+ ahp_gt_set_stepping_conf(0, static_cast<GTSteppingConfiguration>(GTRAWindingSP.findOnSwitchIndex())); |
| 53 |
ahp_gt_write_values(0, &progress, &write_finished); |
| 54 |
updateProperties(); |
| 55 |
} |
| 56 |
if(!strcmp(GTRAGPIOConfigSP.getName(), name)) |
| 57 |
{ |
| 58 |
|
| 59 |
+ ahp_gt_set_feature(0, static_cast<GTFeature>(GTRAGPIOConfigSP.findOnSwitchIndex())); |
| 60 |
ahp_gt_write_values(0, &progress, &write_finished); |
| 61 |
updateProperties(); |
| 62 |
} |
| 63 |
@@ -336,19 +337,19 @@ |
| 64 |
} |
| 65 |
if(!strcmp(GTDESteppingModeSP.getName(), name)) |
| 66 |
{ |
| 67 |
|
| 68 |
+ ahp_gt_set_stepping_mode(1, static_cast<GTSteppingMode>(GTDESteppingModeSP.findOnSwitchIndex())); |
| 69 |
ahp_gt_write_values(1, &progress, &write_finished); |
| 70 |
updateProperties(); |
| 71 |
} |
| 72 |
if(!strcmp(GTDEWindingSP.getName(), name)) |
| 73 |
{ |
| 74 |
|
| 75 |
+ ahp_gt_set_stepping_conf(1, static_cast<GTSteppingConfiguration>(GTDEWindingSP.findOnSwitchIndex())); |
| 76 |
ahp_gt_write_values(1, &progress, &write_finished); |
| 77 |
updateProperties(); |
| 78 |
} |
| 79 |
if(!strcmp(GTDEGPIOConfigSP.getName(), name)) |
| 80 |
{ |
| 81 |
|
| 82 |
+ ahp_gt_set_feature(1, static_cast<GTFeature>(GTDEGPIOConfigSP.findOnSwitchIndex())); |
| 83 |
ahp_gt_write_values(1, &progress, &write_finished); |
| 84 |
updateProperties(); |
| 85 |
} |