GoProControl icon indicating copy to clipboard operation
GoProControl copied to clipboard

Adding GoPro zoom function

Open PlastiBots opened this issue 3 years ago • 1 comments

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);

} `

PlastiBots avatar Mar 09 '22 14:03 PlastiBots

Hello,

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

aster94 avatar Mar 12 '22 14:03 aster94