kopia lustrzana https://github.com/Hamlib/Hamlib
Add legal headers
rodzic
099cc7fc48
commit
4d1148c1ba
|
@ -47,6 +47,7 @@ include $(TOP_PATH)/rotators/prosistel/Android.mk
|
|||
include $(TOP_PATH)/rotators/rotorez/Android.mk
|
||||
include $(TOP_PATH)/rotators/sartek/Android.mk
|
||||
include $(TOP_PATH)/rotators/satel/Android.mk
|
||||
include $(TOP_PATH)/rotators/skywatcher/Android.mk
|
||||
include $(TOP_PATH)/rotators/spid/Android.mk
|
||||
include $(TOP_PATH)/rotators/ts7400/Android.mk
|
||||
include $(TOP_PATH)/rotators/radant/Android.mk
|
||||
|
|
|
@ -1,3 +1,24 @@
|
|||
/*
|
||||
* Hamlib Rotator backend - SkyWatcher
|
||||
* Copyright (c) 2024 by Andrey Rodionov <dernasherbrezon@gmail.com>
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "skywatcher.h"
|
||||
#include "register.h"
|
||||
|
@ -100,7 +121,7 @@ int skywatcher_get_motor_position(ROT *rot, int motor_index, float *result) {
|
|||
char req[16];
|
||||
SNPRINTF(req, sizeof(req), ":j%d\r", motor_index);
|
||||
ERROR_CHECK(skywatcher_cmd(rot, req, str, sizeof(str)));
|
||||
long motor_ticks = skywatcher_convert24bit(strtol(str, NULL, 16)) - 0x800000;
|
||||
long motor_ticks = skywatcher_convert24bit(strtol(str, NULL, 16)) ^ 0x800000;
|
||||
uint32_t cpr;
|
||||
ERROR_CHECK(skywatcher_get_spr(rot, motor_index, &cpr));
|
||||
double ticks_per_angle = (double) cpr / 360.0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Hamlib Rotator backend - Celestron interface protocol
|
||||
* Hamlib Rotator backend - SkyWatcher interface protocol
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -16,6 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HAMLIB_SKYWATCHER_H
|
||||
#define HAMLIB_SKYWATCHER_H 1
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue