Skip to content

Commit 501995c

Browse files
committed
fix: switch analogGain and digitalGain to camelCase
1 parent b2da56e commit 501995c

File tree

4 files changed

+23
-21
lines changed

4 files changed

+23
-21
lines changed

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ Note that this example produces a raw H264 video. Wrapping it in a video contain
219219
- [`Flip`](#flip)
220220
- [`Codec`](#codec)
221221
- [`SensorMode`](#sensormode)
222+
- [`ExposureMode`](#exposuremode)
223+
- [`AwbMode`](#awbmode)
222224

223225
## `StillCamera`
224226
A class for taking still images. Equivalent to running the `raspistill` command.
@@ -244,8 +246,8 @@ const stillCamera = new StillCamera({
244246
- `exposureCompensation: number` - *Default: `0`*
245247
- [`exposureMode: ExposureMode`](#exposuremode) - *Default: Auto*
246248
- [`awbMode: AwbMode`](#awbmode) - *Default: Auto*
247-
- `analoggain: number` - *Default: 0*
248-
- `digitalgain: number` - *Default: 0*
249+
- `analogGain: number` - *Default: 0*
250+
- `digitalGain: number` - *Default: 0*
249251

250252
### `StillCamera.takeImage(): Promise<Buffer>`
251253

@@ -283,8 +285,8 @@ const streamCamera = new StreamCamera({
283285
- `exposureCompensation: number` - *Default: `0`*
284286
- [`exposureMode: ExposureMode`](#exposuremode) - *Default: Auto*
285287
- [`awbMode: AwbMode`](#awbmode) - *Default: Auto*
286-
- `analoggain: number` - *Default: 0*
287-
- `digitalgain: number` - *Default: 0*
288+
- `analogGain: number` - *Default: 0*
289+
- `digitalGain: number` - *Default: 0*
288290

289291
### `startCapture(): Promise<void>`
290292
Begins the camera stream. Returns a `Promise` that is resolved when the capture has started.
@@ -381,17 +383,17 @@ import { ExposureMode } from "pi-camera-connect";
381383

382384
## `AwbMode`
383385
White balance mode options.
384-
- `Off`
385-
- `Auto`
386-
- `Sun`
387-
- `Cloud`
388-
- `Shade`
389-
- `Tungsten`
390-
- `Fluorescent`
391-
- `Incandescent`
392-
- `Flash`
393-
- `Horizon`
394-
- `GreyWorld`
386+
- `Awb.Off`
387+
- `Awb.Auto`
388+
- `Awb.Sun`
389+
- `Awb.Cloud`
390+
- `Awb.Shade`
391+
- `Awb.Tungsten`
392+
- `Awb.Fluorescent`
393+
- `Awb.Incandescent`
394+
- `Awb.Flash`
395+
- `Awb.Horizon`
396+
- `Awb.GreyWorld`
395397

396398
```javascript
397399
import { AwbMode } from "pi-camera-connect";

src/lib/shared-args.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ export function getSharedArgs(options: StillOptions | StreamOptions): string[] {
7171
/**
7272
* Analog Gain
7373
*/
74-
...(options.analoggain ? ['--analoggain', options.analoggain.toString()] : []),
74+
...(options.analogGain ? ['--analoggain', options.analogGain.toString()] : []),
7575

7676
/**
7777
* Digital Gain
7878
*/
79-
...(options.digitalgain ? ['--digitalgain', options.digitalgain.toString()] : [])
79+
...(options.digitalGain ? ['--digitalgain', options.digitalGain.toString()] : [])
8080
];
8181
}

src/lib/still-camera.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export interface StillOptions {
1414
exposureCompensation?: number;
1515
exposureMode?: ExposureMode;
1616
awbMode?: AwbMode;
17-
analoggain?: number;
18-
digitalgain?: number;
17+
analogGain?: number;
18+
digitalGain?: number;
1919
}
2020

2121
export default class StillCamera {

src/lib/stream-camera.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export interface StreamOptions {
3535
exposureCompensation?: number;
3636
exposureMode?: ExposureMode;
3737
awbMode?: AwbMode;
38-
analoggain?: number;
39-
digitalgain?: number;
38+
analogGain?: number;
39+
digitalGain?: number;
4040
}
4141

4242
declare interface StreamCamera {

0 commit comments

Comments
 (0)