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

add awb-compensate, bumb ver #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "arducam_mipicamera"
description = "Rust wrapper for the arducam_mipicamera library."
version = "0.1.1"
version = "0.1.2"
authors = ["Mara Bos <[email protected]>"]
license = "BSD-2-Clause"
repository = "https://github.com/fusion-engineering/arducam-mipicamera-rs"
Expand Down
8 changes: 7 additions & 1 deletion src/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,5 +505,11 @@ extern "C" {
height: c_int,
) -> *mut Buffer;

pub fn arducam_manual_set_awb_compensation(r_gain: u32, b_gain: u32);


///
///
///
pub fn arducam_manual_set_awb_compensation(r_gain: c_int, b_gain: c_int);

}
10 changes: 9 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ impl Camera {
}
}

pub fn arducam_manual_set_awb_compensation(&mut self, red_gain: i32, blue_gain: i32) {
unsafe {
c::arducam_manual_set_awb_compensation(
red_gain,
blue_gain
);
}
}

/// The raw pointer to the camera instance, as used by the C interface.
pub fn raw_pointer(&self) -> c::CameraInstance {
self.ptr
Expand All @@ -145,7 +154,6 @@ impl Camera {
// - set_raw_callback
// - get_support_formats
// - get_support_controls
// - manual_set_awb_compensation
// - read_sensor_reg
// - write_sensor_reg
// - set_lens_table
Expand Down