Implement get position command using custom and test code.
parent
cf4b359af6
commit
86611d1f6b
|
@ -163,8 +163,21 @@ void cmd_proc(int &stepAz, int &stepEl)
|
||||||
while (Serial.available() > 0)
|
while (Serial.available() > 0)
|
||||||
{
|
{
|
||||||
incomingByte = Serial.read();
|
incomingByte = Serial.read();
|
||||||
|
/* XXX: Get position using custom and test code */
|
||||||
|
if (incomingByte == '!')
|
||||||
|
{
|
||||||
|
/* Get position */
|
||||||
|
Serial.print("TM");
|
||||||
|
Serial.print(1);
|
||||||
|
Serial.print(" ");
|
||||||
|
Serial.print("AZ");
|
||||||
|
Serial.print(10*step2deg(AZstepper.currentPosition()), 1);
|
||||||
|
Serial.print(" ");
|
||||||
|
Serial.print("EL");
|
||||||
|
Serial.println(10*step2deg(ELstepper.currentPosition()), 1);
|
||||||
|
}
|
||||||
/*new data*/
|
/*new data*/
|
||||||
if (incomingByte == '\n')
|
else if (incomingByte == '\n')
|
||||||
{
|
{
|
||||||
p = buffer;
|
p = buffer;
|
||||||
buffer[counter] = 0;
|
buffer[counter] = 0;
|
||||||
|
|
Loading…
Reference in New Issue