mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
fix(cctv): display colour-neutral Bosch MIC models
This commit is contained in:
1 parent
7f69beb4f0
commit
fae50c0791
2 files changed
+38
-6
No files matched your search
@@ -33,7 +33,8 @@
|
|||||||
* Bosch MIC order codes end in a colour letter (B black, G grey, W white)
|
* Bosch MIC order codes end in a colour letter (B black, G grey, W white)
|
||||||
* on one shared datasheet; those siblings,
|
* on one shared datasheet; those siblings,
|
||||||
* and the `x` wildcard registries write for the colour letter, are listed as
|
* and the `x` wildcard registries write for the colour letter, are listed as
|
||||||
* aliases of the one vendored record.
|
* aliases of the one vendored record. Its `model` leaves the colour out, so
|
||||||
|
* the HUD never names a variant the source did not.
|
||||||
*/
|
*/
|
||||||
const RECORDS = [
|
const RECORDS = [
|
||||||
{
|
{
|
||||||
@@ -276,11 +277,12 @@ const RECORDS = [
|
|||||||
{
|
{
|
||||||
id: 'bosch-mic-7130-pb4',
|
id: 'bosch-mic-7130-pb4',
|
||||||
brand: 'Bosch',
|
brand: 'Bosch',
|
||||||
model: 'MIC-7130-PB4',
|
model: 'MIC-7130-P_4',
|
||||||
type: 'ptz',
|
type: 'ptz',
|
||||||
url: 'https://www.cctv-database.com/camera/bosch-mic-7130-pb4/',
|
url: 'https://www.cctv-database.com/camera/bosch-mic-7130-pb4/',
|
||||||
aliases: [
|
aliases: [
|
||||||
'MIC IP starlight 7000 HD',
|
'MIC IP starlight 7000 HD',
|
||||||
|
'MIC-7130-PB4',
|
||||||
'MIC-7130-PG4',
|
'MIC-7130-PG4',
|
||||||
'MIC-7130-PW4',
|
'MIC-7130-PW4',
|
||||||
'MIC-7130-Px4',
|
'MIC-7130-Px4',
|
||||||
@@ -295,10 +297,15 @@ const RECORDS = [
|
|||||||
{
|
{
|
||||||
id: 'bosch-mic-7502-z30b',
|
id: 'bosch-mic-7502-z30b',
|
||||||
brand: 'Bosch',
|
brand: 'Bosch',
|
||||||
model: 'MIC-7502-Z30B',
|
model: 'MIC-7502-Z30',
|
||||||
type: 'ptz',
|
type: 'ptz',
|
||||||
url: 'https://www.cctv-database.com/camera/bosch-mic-7502-z30b/',
|
url: 'https://www.cctv-database.com/camera/bosch-mic-7502-z30b/',
|
||||||
aliases: ['MIC-7502-Z30G', 'MIC-7502-Z30W', 'MIC-7502-Z30x'],
|
aliases: [
|
||||||
|
'MIC-7502-Z30B',
|
||||||
|
'MIC-7502-Z30G',
|
||||||
|
'MIC-7502-Z30W',
|
||||||
|
'MIC-7502-Z30x',
|
||||||
|
],
|
||||||
fov_deg: '2.3-63.7',
|
fov_deg: '2.3-63.7',
|
||||||
resolution: { mp: 2.13, w: 1920, h: 1080, label: '1080p' },
|
resolution: { mp: 2.13, w: 1920, h: 1080, label: '1080p' },
|
||||||
ptz: true,
|
ptz: true,
|
||||||
@@ -310,10 +317,15 @@ const RECORDS = [
|
|||||||
{
|
{
|
||||||
id: 'bosch-mic-7522-z30b',
|
id: 'bosch-mic-7522-z30b',
|
||||||
brand: 'Bosch',
|
brand: 'Bosch',
|
||||||
model: 'MIC-7522-Z30B',
|
model: 'MIC-7522-Z30',
|
||||||
type: 'ptz',
|
type: 'ptz',
|
||||||
url: 'https://www.cctv-database.com/camera/bosch-mic-7522-z30b/',
|
url: 'https://www.cctv-database.com/camera/bosch-mic-7522-z30b/',
|
||||||
aliases: ['MIC-7522-Z30G', 'MIC-7522-Z30W', 'MIC-7522-Z30x'],
|
aliases: [
|
||||||
|
'MIC-7522-Z30B',
|
||||||
|
'MIC-7522-Z30G',
|
||||||
|
'MIC-7522-Z30W',
|
||||||
|
'MIC-7522-Z30x',
|
||||||
|
],
|
||||||
fov_deg: '2.1-58.3',
|
fov_deg: '2.1-58.3',
|
||||||
// i18n-ignore: datasheet label
|
// i18n-ignore: datasheet label
|
||||||
resolution: { mp: 2, w: 1920, h: 1080, label: '1080p HD' },
|
resolution: { mp: 2, w: 1920, h: 1080, label: '1080p HD' },
|
||||||
|
|||||||
@@ -291,6 +291,26 @@ test('Bosch MIC colour aliases resolve without accepting unknown variants', () =
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Bosch MIC HUD summary never names a colour the source did not', () => {
|
||||||
|
assert.equal(
|
||||||
|
specSummary(lookupModelSpec('MIC-7522-Z30W')),
|
||||||
|
'Bosch MIC-7522-Z30 · 1080p HD · COLOR · PTZ',
|
||||||
|
);
|
||||||
|
assert.equal(
|
||||||
|
specSummary(lookupModelSpec('Bosch MIC-7522-Z30x')),
|
||||||
|
'Bosch MIC-7522-Z30 · 1080p HD · COLOR · PTZ',
|
||||||
|
);
|
||||||
|
for (const pattern of ['MIC-7130-P?4', 'MIC-7502-Z30?', 'MIC-7522-Z30?']) {
|
||||||
|
for (const colour of ['B', 'G', 'W', 'x']) {
|
||||||
|
const spec = lookupModelSpec(pattern.replace('?', colour));
|
||||||
|
const summary = specSummary(spec);
|
||||||
|
for (const other of ['B', 'G', 'W', 'x']) {
|
||||||
|
assert.ok(!summary.includes(pattern.replace('?', other)), summary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
test('Bosch MIC catalog enrichment preserves estimated and explicit optics', () => {
|
test('Bosch MIC catalog enrichment preserves estimated and explicit optics', () => {
|
||||||
for (const model of [
|
for (const model of [
|
||||||
'Bosch MIC-7130-Px4',
|
'Bosch MIC-7130-Px4',
|
||||||
|
|||||||
Reference in new issue
Block a user