Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
**V1.10.8 - Updates**
- Fix Meade parsing from INDI clients.

**V1.10.6 - Updates**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you need to fetch and rebase your changes onto develop, you created your branch quite a while ago:

# Add an upstream URL
# This URL is for ssh, change it if you use HTTPS
git remote add upstream git@github.com:OpenAstroTech/OpenAstroTracker-Firmware.git
git fetch -p upstream
git rebase -i origin/develop # Interactive rebase
# Fix merge conflicts
git push -f # Force push is needed because the commits have changed

- Use consistent enable pin logic for all drivers.
- Increase maximum current for TMC2209 to 2A in accordance with BigTreeTech's published maximum continuous drive current.
Expand Down
6 changes: 6 additions & 0 deletions Configuration_adv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,3 +569,9 @@
#error "Debugging not supported on this platform"
#endif
#endif

// define INDI_SUPPORT in the local configuration if you want it to work
// currently this will fix Meade longitude parsing
#ifndef INDI_SUPPORT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this to the Misc Configuration section of this file

#define INDI_SUPPORT 0
#endif
2 changes: 1 addition & 1 deletion Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// Also, numbers are interpreted as simple numbers. _ __ _
// So 1.8 is actually 1.08, meaning that 1.12 is a later version than 1.8. \_(..)_/

#define VERSION "V1.10.6"
#define VERSION "V1.10.8"
10 changes: 8 additions & 2 deletions src/Longitude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
#include "Utility.hpp"
#include "Longitude.hpp"

#if INDI_SUPPORT == 1
#define LONGITUDE_OFFSET 0L
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add in

#pragma message("Note: INDI offset used, firmware will not function correctly with ASCOM!")

? Just so that we can have traceability if a user is having problems.

#else
#define LONGITUDE_OFFSET 180L
#endif

//////////////////////////////////////////////////////////////////////////////////////
//
// -180..180 range, 0 is at the prime meridian (through Greenwich), negative going west, positive going east
Expand Down Expand Up @@ -41,7 +47,7 @@ Longitude Longitude::ParseFromMeade(String const &s)
DayTime dt = DayTime::ParseFromMeade(s);

//from indilib driver: Meade defines longitude as 0 to 360 WESTWARD (https://github.com/indilib/indi/blob/1b2f462b9c9b0f75629b635d77dc626b9d4b74a3/drivers/telescope/lx200driver.cpp#L1019)
result.totalSeconds = 180L * 3600L - dt.getTotalSeconds();
result.totalSeconds = LONGITUDE_OFFSET * 3600L - dt.getTotalSeconds();
result.checkHours();

LOGV4(DEBUG_GENERAL, F("[LONGITUDE]: Parse(%s) -> %s = %ls"), s.c_str(), result.ToString(), result.getTotalSeconds());
Expand Down Expand Up @@ -72,7 +78,7 @@ const char *Longitude::formatString(char *targetBuffer, const char *format, long
long secs = totalSeconds;

// Map to 0..360 westwards
secs = 180L * 3600L - secs;
secs = LONGITUDE_OFFSET * 3600L - secs;

long degs = secs / 3600;
secs = secs - degs * 3600;
Expand Down