Skip to content

Commit

Permalink
Merge pull request #97 from Y-Nak/bump-version
Browse files Browse the repository at this point in the history
Bump version
  • Loading branch information
Y-Nak authored Jun 9, 2021
2 parents 973776d + d219086 commit cfe66d1
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 22 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ First, you need to install [libusb][libusb-url] to communicate with `U3V` camera

```toml
[dependencies]
cameleon = { version = 0.1, features = 'libusb'}
cameleon = { version = 0.1, features = 'libusb' }
```

You can enumerate all cameras connected to the host, and start streaming.
Expand All @@ -59,8 +59,8 @@ camera.open().unwrap();
// Loads `GenApi` context. This is necessary for streaming.
camera.load_context().unwrap();

// Start streaming.
let payload_rx = camera.start_streaming(10).unwrap();
// Start streaming. Channel capacity is set to 3.
let payload_rx = camera.start_streaming(3).unwrap();

let mut payload_count = 0;
while payload_count < 10 {
Expand Down
4 changes: 2 additions & 2 deletions cameleon/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cameleon"
version = "0.1.1"
version = "0.1.2"
authors = ["Cameleon Project Developers"]
edition = "2018"
license = "MPL-2.0"
Expand All @@ -24,7 +24,7 @@ async-std = { version = "1.9.0", features = ["unstable"] }
futures = "0.3.14"
tracing = "0.1.26"
auto_impl = "0.4.1"
cameleon-device = { path = "../device", version = "0.1.0" }
cameleon-device = { path = "../device", version = "0.1.1" }
cameleon-genapi = { path = "../genapi", version = "0.1.0" }
rusb = { version = "0.8.1", optional = true }
libusb1-sys = { version = "0.5.0", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions cameleon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ camera.open().unwrap();
// Loads `GenApi` context. This is necessary for streaming.
camera.load_context().unwrap();

// Start streaming.
let payload_rx = camera.start_streaming(10).unwrap();
// Start streaming. Channel capacity is set to 3.
let payload_rx = camera.start_streaming(3).unwrap();

let mut payload_count = 0;
while payload_count < 10 {
Expand Down
2 changes: 1 addition & 1 deletion cameleon/examples/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Examples

## [stream.rs](stream.rs)
Describes how to start streaming and reeceive payloads.
Describes how to start streaming and receive payloads.

```sh
cargo run --example stream --features=libusb
Expand Down
5 changes: 3 additions & 2 deletions cameleon/examples/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ fn main() {
// Load `GenApi` context.
camera.load_context().unwrap();

// Start streaming.
let payload_rx = camera.start_streaming(10).unwrap();
// Start streaming. Channel capacity is set to 3.
let payload_rx = camera.start_streaming(3).unwrap();

let mut payload_count = 0;
while payload_count < 10 {
match payload_rx.try_recv() {
Expand Down
8 changes: 8 additions & 0 deletions cameleon/examples/u3v/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Examples

## [register_map](register_mapl.rs)
Describes how to read/write `U3V` camera's specific registers.

```sh
cargo run --example u3v_register_map --features=libusb
```
4 changes: 3 additions & 1 deletion cameleon/examples/u3v/register_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

//! This example describes how to read/write `U3V` camera's specific registers.
use cameleon::u3v::enumerate_cameras;

fn main() {
Expand Down Expand Up @@ -89,7 +91,7 @@ fn main() {
//

// Read SBRM.
println!("\n### Technology Specifig Boot Register Map ###\n");
println!("\n### Technology Specific Boot Register Map ###\n");

let sbrm = ctrl.sbrm().unwrap();
println!("u3v_version: {}", sbrm.u3v_version(ctrl).unwrap());
Expand Down
17 changes: 9 additions & 8 deletions cameleon/src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
//! // Loads `GenApi` context. This is necessary for streaming.
//! camera.load_context().unwrap();
//!
//! // Start streaming.
//! let payload_rx = camera.start_streaming(10).unwrap();
//! // Start streaming. Channel capacity is set to 3.
//! let payload_rx = camera.start_streaming(3).unwrap();
//!
//! let mut payload_count = 0;
//! while payload_count < 10 {
Expand Down Expand Up @@ -85,8 +85,8 @@ use super::{
/// // Loads `GenApi` context. This is necessary for streaming.
/// camera.load_context().unwrap();
///
/// // Start streaming.
/// let payload_rx = camera.start_streaming(10).unwrap();
/// // Start streaming. Channel capacity is set to 3.
/// let payload_rx = camera.start_streaming(3).unwrap();
///
/// let mut payload_count = 0;
/// while payload_count < 10 {
Expand Down Expand Up @@ -270,8 +270,8 @@ impl<Ctrl, Strm, Ctxt> Camera<Ctrl, Strm, Ctxt> {
/// camera.open().unwrap();
/// camera.load_context().unwrap();
///
/// // Start streaming, the capacity of the receiver is 10.
/// let payload_rx = camera.start_streaming(10).unwrap();
/// // Start streaming. Channel capacity is set to 3.
/// let payload_rx = camera.start_streaming(3).unwrap();
/// // The streamed payload can be received like below:
/// // payload_rx.recv().await.unwrap() or
/// // payload.rx.try_recv().unwrap();
Expand Down Expand Up @@ -337,8 +337,9 @@ impl<Ctrl, Strm, Ctxt> Camera<Ctrl, Strm, Ctxt> {
/// // Loads `GenApi` context. This is necessary for streaming.
/// camera.load_context().unwrap();
///
/// // Start streaming, the capacity of the receiver is 10.
/// let payload_rx = camera.start_streaming(10).unwrap();
/// // Start streaming. Channel capacity is set to 3.
/// let payload_rx = camera.start_streaming(3).unwrap();
///
/// camera.stop_streaming().unwrap();
/// ```
#[tracing::instrument(skip(self),
Expand Down
4 changes: 2 additions & 2 deletions cameleon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
//! // Loads `GenApi` context. This is necessary for streaming.
//! camera.load_context().unwrap();
//!
//! // Start streaming.
//! let payload_rx = camera.start_streaming(10).unwrap();
//! // Start streaming. Channel capacity is set to 3.
//! let payload_rx = camera.start_streaming(3).unwrap();
//!
//! let mut payload_count = 0;
//! while payload_count < 10 {
Expand Down
2 changes: 1 addition & 1 deletion device/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cameleon-device"
version = "0.1.0"
version = "0.1.1"
edition = "2018"
authors = ["Cameleon Project Developers"]
license = "MPL-2.0"
Expand Down

0 comments on commit cfe66d1

Please sign in to comment.