Skip to content

Conversation

anjok
Copy link

@anjok anjok commented Feb 10, 2022

whole thing is explained here: #166

@openastrotech-bot
Copy link
Contributor

Looks like your PR has code that needs to be changed in order to meet our coding standards!
Here are your options:

  1. Apply the patch that was generated by the job
    1. Click details under the failing clang-format check
    2. Click the Artifacts dropdown in the top right
    3. Download + unzip the clang-format-diff.patch file into the OpenAstroTracker-Firmware repo
    4. Run git apply clang-format-diff.patch to make the changes
    5. Commit and push up the formatted code
  2. Run clang-format locally
    1. Run the command bash -c 'shopt -s nullglob; for i in ./{.,src,src/inc,boards/*}/*.{c,cpp,h,hpp}; do clang-format -i $i; done'
    2. Commit and push up the formatted code

Copy link
Member

@julianneswinoga julianneswinoga left a comment

Choose a reason for hiding this comment

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

FYI in order for all the workflow checks to pass you also need to update Changelog.md and Version.h


// define INDI in the local configuration if you want it to work
#ifndef INDI
#define INDI 0
Copy link
Member

Choose a reason for hiding this comment

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

I would rename this #define to be a little more specific. INDI_LONGITUDE_HACK maybe?

Copy link
Author

Choose a reason for hiding this comment

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

Actually... it's the opposite, at least from my understanding. What it does is preserve the current parsing on Gg12 -> 180 - 12 for users of the current ASCOM driver, when the correct value should be - 12. The parsing assumes that KStars/Meade/ASCOM will have a 180 - x offset added when in fact it does not.

The whole thing is explained here (and I should referenced this in the subject): #166

I just named it INDI (which is a lame name, agreed, maybe INDI_SUPPORT) because I have a feeling there might be more stuff coming in to support KStars and I didn't want flags for all of them.

Copy link
Member

Choose a reason for hiding this comment

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

We can re-evaluate at a later date if more INDI-specific changes are needed. More specific is better in the current case.

@anjok
Copy link
Author

anjok commented Feb 13, 2022

I don't get the needed change for changelog and version. Why is this on me to do that? How would I know which version this is going into?

Normally, you'd merge some PRs to develop, then decide it's time for a release and do the changelog and version in a commit there...

@anjok
Copy link
Author

anjok commented Feb 13, 2022

Added version stuff, renamed and moved define and force-pushed.

@julianneswinoga
Copy link
Member

I don't get the needed change for changelog and version. Why is this on me to do that? How would I know which version this is going into?

Normally, you'd merge some PRs to develop, then decide it's time for a release and do the changelog and version in a commit there...

  1. It's up to the author how they would like to describe their changes in the changelog. It's not auto-generated from commits (which I'm assuming is what you are thinking about) because commits are directed more at developers, where the changelog is directed more at users.
  2. For changes like this the next version is simply a minor version increment. We try to follow https://semver.org/ convention
  3. For full releases the changes are thus very easy to create simply by looking at the prose changes in Changelog.md 😄

@julianneswinoga
Copy link
Member

Added version stuff, renamed and moved define and force-pushed.

It would be appreciated if you didn't squash+force-push while a PR is under review (i.e. only do that right before the PR is going to be merged). It makes it very hard to follow incremental changes and review them accordingly.

**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

#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.


// define INDI in the local configuration if you want it to work
#ifndef INDI
#define INDI 0
Copy link
Member

Choose a reason for hiding this comment

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

We can re-evaluate at a later date if more INDI-specific changes are needed. More specific is better in the current case.


// 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

@JakobPetersson
Copy link

JakobPetersson commented Mar 21, 2022

@cameronswinoga Should I create a new PR with these changes if i wish to see them merged?

@anjok
Copy link
Author

anjok commented Mar 21, 2022

You also need to fix the sign of the utc offset in the meadeparser

@anjok
Copy link
Author

anjok commented Mar 21, 2022

Like so, but you also need to move the flag to Configuration_avd.hpp (or just skip these conditionals alltogether and just fix it, as this is only about windows users not needing to update the ASCOM driver) :

 void Mount::setLocalUtcOffset(int offset)
 {
+    #if INDI
+    offset = -offset;
+    #endif
     _localUtcOffset = offset;

@JakobPetersson
Copy link

Fixes for this are included in #181.
I suggest we close this and move forward there.

@ClutchplateDude
Copy link
Member

Fixes made in #181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants