Skip to content
Closed
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Before you can classify data you'll first need to collect it. If you want to col

### Collecting data from other sensors

To collect data from other sensors you'll need to write some code where you instantiate a `DataForwarder` object, write data samples, and finally call `finalize()` which uploads the data to Edge Impulse. [Here's an end-to-end example](https://github.com/edgeimpulse/edge-impulse-linux-cli/blob/master/examples/collect-custom.ts).
To collect data from other sensors you'll need to write some code where you instantiate a `DataForwarder` object, write data samples, and finally call `finalize()` which uploads the data to Edge Impulse. [Here's an end-to-end example](https://github.com/edgeimpulse/edge-impulse-linux-cli/blob/master/examples/ts/collect-custom.ts).

### CLI Options

Expand Down
15 changes: 14 additions & 1 deletion library/sensors/gstreamer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ export class GStreamer extends EventEmitter<{
osRelease = '';
}

if (this._verbose) {
console.log(PREFIX, 'OS Release:', JSON.stringify(osRelease, null, 2));
}

let firmwareModel;
// using /proc/device-tree as recommended in user space.
if (await this.exists('/proc/device-tree/model')) {
Expand All @@ -183,8 +187,14 @@ export class GStreamer extends EventEmitter<{
// so we don't need to check for undefined below
firmwareModel = '';
}

if (this._verbose) {
console.log(PREFIX, 'Firmware Model:', JSON.stringify(firmwareModel, null, 2));
}

if (firmwareModel.indexOf('RB3gen2') > -1 && firmwareModel.indexOf('vision') > -1) {
// First condition for support QLI 1.x and second condition for support QLI 2.x
if ((firmwareModel.indexOf('RB3gen2') > -1 && firmwareModel.indexOf('vision') > -1) ||
(firmwareModel.indexOf('RB3gen2') > -1 && osRelease.indexOf('ID=qcom-distro') > -1 && osRelease.indexOf('VERSION_ID=2.') > -1)) {
this._mode = 'qualcomm-rb3gen2';
}
else if (firmwareModel.indexOf('Qualcomm') > -1 && firmwareModel.indexOf('Yupik') > -1) {
Expand All @@ -211,6 +221,9 @@ export class GStreamer extends EventEmitter<{
}

this._mode = (this._modeOverride) ? this._modeOverride : this._mode;
if (this._verbose) {
console.log(PREFIX, 'selected platform mode:', this._mode);
}
}

async listDevices(): Promise<string[]> {
Expand Down
Loading