Skip to content

Commit

Permalink
Fix response parse. Fixes indilib#1932
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed Sep 15, 2023
1 parent 88b2a0e commit f821d7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/telescope/rainbow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,7 @@ Rainbow::TelescopePierSide Rainbow::getSideOfPier()
if (!sendCommand(":CG3#", cg3Response))
return PIER_UNKNOWN;

sscanf(cg3Response + 3, "%g", &decAxisAlignmentOffset);
sscanf(cg3Response + 4, "%f", &decAxisAlignmentOffset);

if (!sendCommand(":CY#", cyResponse))
return PIER_UNKNOWN;
Expand All @@ -1677,7 +1677,7 @@ Rainbow::TelescopePierSide Rainbow::getSideOfPier()

strncpy(rotationAngle, cyResponse + 3, 7);

sscanf(rotationAngle, "%g", &decAxis);
sscanf(rotationAngle, "%f", &decAxis);

auto offset = decAxis - decAxisAlignmentOffset;

Expand Down

0 comments on commit f821d7f

Please sign in to comment.