Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Adafruit_VC0706.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,29 @@ uint8_t Adafruit_VC0706::getCompression(void) {
return camerabuff[5];
}

boolean Adafruit_VC0706::setBrightness(uint8_t c) {
uint8_t args[] = {0x5, 0x1, 0x1, 0x1A, 0x10, c};
return runCommand(VC0706_WRITE_DATA, args, sizeof(args), 5);
}

boolean Adafruit_VC0706::setContrast(uint8_t c) {
uint8_t args[] = {0x5, 0x1, 0x1, 0x1A, 0x11, c};
return runCommand(VC0706_WRITE_DATA, args, sizeof(args), 5);
}

boolean Adafruit_VC0706::setHue(uint8_t c) {
uint8_t args[] = {0x5, 0x1, 0x1, 0x1A, 0x14, c};
return runCommand(VC0706_WRITE_DATA, args, sizeof(args), 5);
}
boolean Adafruit_VC0706::setSaturation(uint8_t c) {
uint8_t args[] = {0x5, 0x1, 0x1, 0x1A, 0x15, c};
return runCommand(VC0706_WRITE_DATA, args, sizeof(args), 5);
}
boolean Adafruit_VC0706::setOffContrast(uint8_t c) {
uint8_t args[] = {0x5, 0x1, 0x1, 0x1A, 0x12, c};
return runCommand(VC0706_WRITE_DATA, args, sizeof(args), 5);
}

boolean Adafruit_VC0706::setPTZ(uint16_t wz, uint16_t hz, uint16_t pan, uint16_t tilt) {
uint8_t args[] = {0x08, wz >> 8, wz,
hz >> 8, wz,
Expand Down
5 changes: 5 additions & 0 deletions Adafruit_VC0706.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ class Adafruit_VC0706 {
boolean cameraFrameBuffCtrl(uint8_t command);
uint8_t getCompression();
boolean setCompression(uint8_t c);
boolean setBrightness(uint8_t c);
boolean setContrast(uint8_t c);
boolean setHue(uint8_t c);
boolean setSaturation(uint8_t c);
boolean setOffContrast(uint8_t c);

boolean getPTZ(uint16_t &w, uint16_t &h, uint16_t &wz, uint16_t &hz, uint16_t &pan, uint16_t &tilt);
boolean setPTZ(uint16_t wz, uint16_t hz, uint16_t pan, uint16_t tilt);
Expand Down