JagCesar / Tesla-API

A iOS, macOS, watchOS and tvOS framework written in Swift to communicate with Teslas vehicle API
MIT License
34 stars 6 forks source link

Added HVAC start/stop endpoint #26

Closed omarthen3rd closed 6 years ago

omarthen3rd commented 6 years ago

It's /u/omarabbasi from the r/teslamotors subreddit.

JagCesar commented 6 years ago

Hey @omarthen3rd! Thanks for taking the time to submit a PR! Do you have access to a Tesla so you can test this code? If not, I'll gladly try it out.

Also, do you mind fixing the stuff @houndci-bot found? It's just lint errors, so nothing fatal. If you run the swiftlint CLI tool it can probably fix most of this stuff for you.

omarthen3rd commented 6 years ago

Unfortunately I do not have access to a Tesla, but I'll definitely fix the @houndci-bot stuff

JagCesar commented 6 years ago

@omarthen3rd Ok, no worries. I'll try this out!

I just noticed that you based your branch on my codable-models branch instead of develop. This means that this PR includes my experimental (not working) codable implementation.

What you need to do is create a new branch based on develop and cherry pick your commit. Or stash the changes you made, reverse your branch two commits and then commit your changes. Do you know how to do this or do you need some help with it?

I'll set the base in this PR to develop so we don't accidentally merge this into codable-models.

omarthen3rd commented 6 years ago

Oh, that's my bad! I'll definitely fix it but I may require some help to do so.

JagCesar commented 6 years ago

@omarthen3rd I think the easiest way to fix this would be to create a new branch based on develop, then cherry pick your commits.

Or I can fix it for you if you give me write access to your fork. :)

JagCesar commented 6 years ago

@omarthen3rd I have now fixed so this PR no longer includes the non finished Codable implementation. I did it by doing an interactive rebase of the last 3 commits.

Now sadly this PR doesn’t build because we used a Response class that doesn’t exist yet. It is implemented in on the Codable-branch.

So if u pull my changes and try to build you’ll se what’s wrong.

omarthen3rd commented 6 years ago

Hmm, it doesn't let me pull as it thinks there are no changes, but I know how that might cause an issue. How would you prefer to go ahead and fix this?

omarthen3rd commented 6 years ago

Thanks, but unfortunately I didn't figure out how to merge the fixes yet

westerlund commented 6 years ago

@omarthen3rd I think the easiest fix would be to cherry-pick your commits on a new branch based on develop and create a new PR. For that we don't have to force-push or anything magical! What do you think?

omarthen3rd commented 6 years ago

Good idea! I already did that a few hours back and created a new PR with some other changes as well.

westerlund commented 6 years ago

@omarthen3rd awesome! I'll close this PR and we'll continue on the new one (#27)!