Skip to content

Adding GoPro zoom function #42

@PlastiBots

Description

@PlastiBots

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

}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions