diff options
| author | Your Name <you@example.com> | 2026-01-05 08:52:08 +0000 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-01-05 08:52:08 +0000 |
| commit | f6f8eeb11bbdd7f6cbd534973b1728fcf4f60f2a (patch) | |
| tree | 1424b7181c7a331a7e6105da9d0b42d4cdbb69ca /indi-celestronaux | |
| parent | 03c22ff72d6ebfd2b5e70d146517a5111c2155f5 (diff) | |
| download | indi_mount_driver-master.tar.gz indi_mount_driver-master.tar.bz2 indi_mount_driver-master.zip | |
Diffstat (limited to 'indi-celestronaux')
| -rw-r--r-- | indi-celestronaux/celestronaux.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indi-celestronaux/celestronaux.cpp b/indi-celestronaux/celestronaux.cpp index c922059..dc4ba5a 100644 --- a/indi-celestronaux/celestronaux.cpp +++ b/indi-celestronaux/celestronaux.cpp @@ -56,6 +56,12 @@ double anglediff(double a, double b) return std::abs(d) * ((a - b >= 0 && a - b <= 180) || (a - b <= -180 && a - b >= -360) ? 1 : -1); } + +static int32_t u32toi32(uint32_t i) +{ +return (int32_t) i; +} + ///////////////////////////////////////////////////////////////////////////////////// /// ///////////////////////////////////////////////////////////////////////////////////// @@ -2871,8 +2877,8 @@ bool CelestronAUX::processResponse(AUXCommand &m) HeaterPower.apply(); break; case HEATER_GET_AMBIENT: - Ambient[0].setValue(0.001*m.getData(4,0)); - Ambient[1].setValue(0.001*m.getData(4,4)); + Ambient[0].setValue(0.001*u32toi32(m.getData(4,0))); + Ambient[1].setValue(0.001*u32toi32(m.getData(4,4))); Ambient[2].setValue(m.getData(1,8)); Ambient.setState(IPS_OK); Ambient.apply(); @@ -2896,11 +2902,11 @@ bool CelestronAUX::processResponse(AUXCommand &m) HeaterPortMode[p][1].setState(mode?ISS_OFF:ISS_ON); HeaterPortControl[p][1].setValue((100./255.)*m.getData(1,2)); - HeaterPortState[p][0].setValue(0.1*m.getData(2,3)); + HeaterPortState[p][0].setValue(0.01*m.getData(2,3)); HeaterPortControl[p][0].setValue(m.getData(1,5)); if (m.getDataSize()==10) - HeaterPortState[p][1].setValue(0.001*m.getData(4,6)); + HeaterPortState[p][1].setValue(0.001*u32toi32(m.getData(4,6))); HeaterPortMode[p].apply(); HeaterPortMode[p].setState(IPS_OK); |
