diff --git a/README.md b/README.md index eeed6c0..fb12b84 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Sidereal Objects - A strangely named Arduino Library for providing low precision Epoch 2000.0 Astronomical object coordinates. - Version 1.1.0 - September 3, 2021 + Version 1.1.1 - May 7, 2022 By David Armstrong https://github.com/DavidArmstrong/SiderealObjects diff --git a/keywords.txt b/keywords.txt index 516025a..9f2916c 100644 --- a/keywords.txt +++ b/keywords.txt @@ -40,5 +40,7 @@ getAltIdentifiedObjectNumber KEYWORD2 ####################################### # Constants (LITERAL1) ####################################### - +NSTARS LITERAL1 +NGCNUM LITERAL1 +ICNUM LITERAL1 diff --git a/library.properties b/library.properties index 61c4e13..769c8e9 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SiderealObjects -version=1.1.0 +version=1.1.1 author=David Armstrong maintainer=David Armstrong sentence=A library for providing basic astronomy related object tables. diff --git a/src/SiderealObjects.cpp b/src/SiderealObjects.cpp index 665eba5..48928ed 100644 --- a/src/SiderealObjects.cpp +++ b/src/SiderealObjects.cpp @@ -119,8 +119,8 @@ char* SiderealObjects::printStarName(int n) { return starName[index].name; } } - char* temp = ""; - return temp; + strcpy(tempStarName, ""); + return tempStarName; } boolean SiderealObjects::selectNGCTable(int n) { diff --git a/src/SiderealObjects.h b/src/SiderealObjects.h index 830f05b..15663f7 100644 --- a/src/SiderealObjects.h +++ b/src/SiderealObjects.h @@ -28,6 +28,7 @@ Distributed as-is; no warranty is given. #include //#include +#include #include "SiderealObjectsTables.h" #if defined(ARDUINO) && ARDUINO >= 100 @@ -50,6 +51,9 @@ struct SiderealObjectsData { class SiderealObjects { // user-accessible "public" interface public: + const int NSTARS = 609; // Number of stars in table + const int NGCNUM = 7840; // Number of NGC objects + const int ICNUM = 5386; // Number of IC objects SiderealObjectsData spData; boolean begin(void); double decimalDegrees(int degrees, int minutes, float seconds); @@ -77,9 +81,6 @@ class SiderealObjects { const double F2PI = 2.0 * M_PI; const double F2to16 = 65536.0; const double F2to15minus1 = 32767.0; - const int NSTARS = 609; // Number of stars in table - const int NGCNUM = 7840; // Number of NGC objects - const int ICNUM = 5386; // Number of IC objects double RAdec, DeclinationDec; double RArad, DeclinationRad; @@ -102,5 +103,7 @@ class SiderealObjects { unsigned int bit16[2]; unsigned char bit8[4]; }; + + char* tempStarName; }; #endif