Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding GoPro zoom function #42

Open
PlastiBots opened this issue Mar 9, 2022 · 1 comment
Open

Adding GoPro zoom function #42

PlastiBots opened this issue Mar 9, 2022 · 1 comment

Comments

@PlastiBots
Copy link

PlastiBots commented Mar 9, 2022

Hi. My apologies. Not an issue but didn't know how to make a suggestion and I'm not familiar much with forking... (there's a joke there I'm sure.. LOL...)... Anyway, I have a GP Hero 7 and added a new function to my code to enable the digital zoom feature in Hero 7's and above. Here's the code (not perfect) but it works:

GoProControl.h added:
int zoomPhoto(const int zoomPct);

GoProControl.cpp added:
`int GoProControl::zoomPhoto(int zoomPct)
{
//Reference: https://github.com/KonradIT/goprowifihack/blob/master/HERO7/HERO7-Commands.md
//http://10.5.5.9/gp/gpControl/command/digital_zoom?range_pcnt=[PERCENTAGE FROM 0 to 100]

char pctAsStr[6];
itoa(zoomPct, pctAsStr, 10);

makeRequest(_request, "/gp/gpControl/command/digital_zoom?range_pcnt=", (char *)pctAsStr);
return handleHTTPRequest(_request);

}
`

@aster94
Copy link
Owner

aster94 commented Mar 12, 2022

Hello,

Yes it's nice, would you like to make a pull request?

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

No branches or pull requests

2 participants