Merge branch 'onewire_detect' into dev_environment
This commit is contained in:
commit
ff5d90a635
15 changed files with 256 additions and 15 deletions
|
|
@ -15,7 +15,9 @@ export function sameComponentID(
|
|||
const sameType: boolean = id1.type === id2.type;
|
||||
const sameAddressType: boolean = id1.addressType === id2.addressType;
|
||||
const sameAddress: boolean = (!id1.address && !id2.address) || id1.address === id2.address;
|
||||
return sameType && sameAddressType && sameAddress;
|
||||
const sameExpansion: boolean = (!id1.expansionLine && !id2.expansionLine) || id1.expansionLine === id2.expansionLine;
|
||||
const sameMux: boolean = (!id1.muxLine && !id2.muxLine) || id1.muxLine === id2.muxLine;
|
||||
return sameType && sameAddressType && sameAddress && sameExpansion && sameMux;
|
||||
}
|
||||
|
||||
export function getComponentIDString(component?: Component): string {
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ export interface ComponentTypeExtension {
|
|||
//if the map does not exist then just use the array from the device availability,
|
||||
//if the map does exist filter the availability after claims to find matching address between them and use that
|
||||
subtypeI2CMap?: Map<number, number[]>
|
||||
isChainable?: boolean
|
||||
}
|
||||
|
||||
export interface Summary {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ export function CapacitorCable(subtype: number = 0): ComponentTypeExtension {
|
|||
isSource: true,
|
||||
isArray: true,
|
||||
isCalibratable: false,
|
||||
isChainable: true,
|
||||
addressTypes: addressTypes,
|
||||
interactionResultTypes: [],
|
||||
states: [],
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ export function dragerGasDongle(subtype: number = 0): ComponentTypeExtension {
|
|||
smoothingAverages,
|
||||
filters
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
chartData = simpleLineChartData(
|
||||
quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE,
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ export function GrainCable(subtype: number = 0): ComponentTypeExtension {
|
|||
isSource: true,
|
||||
isArray: true,
|
||||
isCalibratable: false,
|
||||
isChainable: true,
|
||||
addressTypes: [quack.AddressType.ADDRESS_TYPE_CONFIGURABLE_PIN_ARRAY, quack.AddressType.ADDRESS_TYPE_I2C],
|
||||
interactionResultTypes: [],
|
||||
states: [],
|
||||
|
|
|
|||
|
|
@ -63,6 +63,11 @@ const subtypes = [
|
|||
key: quack.BooleanOutputSubtype.BOOLEAN_OUTPUT_SUBTYPE_EXHAUST_FAN,
|
||||
value: "BOOLEAN_OUTPUT_SUBTYPE_FAN",
|
||||
friendlyName: "Exhaust Fan"
|
||||
} as Subtype,
|
||||
{
|
||||
key: quack.BooleanOutputSubtype.BOOLEAN_OUTPUT_SUBTYPE_ALARM,
|
||||
value: "BOOLEAN_OUTPUT_SUBTYPE_ALARM",
|
||||
friendlyName: "Alarm"
|
||||
} as Subtype
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ export function PressureCable(subtype: number = 0): ComponentTypeExtension {
|
|||
isArray: true,
|
||||
hasFan: true,
|
||||
isCalibratable: false,
|
||||
isChainable: true,
|
||||
addressTypes: [quack.AddressType.ADDRESS_TYPE_CONFIGURABLE_PIN_ARRAY],
|
||||
interactionResultTypes: [],
|
||||
states: [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue