added i2c as an option for drager components
This commit is contained in:
parent
4d758ef26f
commit
f9ae15f2c8
4 changed files with 18 additions and 14 deletions
|
|
@ -16,7 +16,8 @@ export const I2C: AddressTypeExtension = {
|
||||||
[quack.ComponentType.COMPONENT_TYPE_CAPACITANCE, 0x4f],
|
[quack.ComponentType.COMPONENT_TYPE_CAPACITANCE, 0x4f],
|
||||||
[quack.ComponentType.COMPONENT_TYPE_CAPACITOR_CABLE, 0x4f],
|
[quack.ComponentType.COMPONENT_TYPE_CAPACITOR_CABLE, 0x4f],
|
||||||
[quack.ComponentType.COMPONENT_TYPE_SEN5X, 0x68],
|
[quack.ComponentType.COMPONENT_TYPE_SEN5X, 0x68],
|
||||||
[quack.ComponentType.COMPONENT_TYPE_AIRFLOW, 0x6b]
|
[quack.ComponentType.COMPONENT_TYPE_AIRFLOW, 0x6b],
|
||||||
|
[quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE, 0x6c]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const offset = offsets.get(componentType);
|
const offset = offsets.get(componentType);
|
||||||
|
|
|
||||||
|
|
@ -48,16 +48,16 @@ export function dragerGasDongle(subtype: number = 0): ComponentTypeExtension {
|
||||||
return {
|
return {
|
||||||
type: quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE,
|
type: quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE,
|
||||||
subtypes: [
|
subtypes: [
|
||||||
{
|
// {
|
||||||
key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_NONE,
|
// key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_NONE,
|
||||||
value: "DRAGER_GAS_DONGLE_SUBTYPE_NONE",
|
// value: "DRAGER_GAS_DONGLE_SUBTYPE_NONE",
|
||||||
friendlyName: "Drager Gas Chain"
|
// friendlyName: "Drager Gas Chain"
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_DEBUG_VOLTAGE,
|
// key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_DEBUG_VOLTAGE,
|
||||||
value: "DRAGER_GAS_DONGLE_SUBTYPE_ADVANCED",
|
// value: "DRAGER_GAS_DONGLE_SUBTYPE_ADVANCED",
|
||||||
friendlyName: "Drager Gas Chain - Voltage Debug"
|
// friendlyName: "Drager Gas Chain - Voltage Debug"
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_CO_CO2_NO2_O2,
|
// key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_CO_CO2_NO2_O2,
|
||||||
// value: "DRAGER_GAS_DONGLE_SUBTYPE_ADVANCED",
|
// value: "DRAGER_GAS_DONGLE_SUBTYPE_ADVANCED",
|
||||||
|
|
@ -100,7 +100,7 @@ export function dragerGasDongle(subtype: number = 0): ComponentTypeExtension {
|
||||||
isSource: true,
|
isSource: true,
|
||||||
isArray: true,
|
isArray: true,
|
||||||
isCalibratable: false,
|
isCalibratable: false,
|
||||||
addressTypes: [quack.AddressType.ADDRESS_TYPE_CONFIGURABLE_PIN_ARRAY],
|
addressTypes: [quack.AddressType.ADDRESS_TYPE_CONFIGURABLE_PIN_ARRAY, quack.AddressType.ADDRESS_TYPE_I2C],
|
||||||
interactionResultTypes: [],
|
interactionResultTypes: [],
|
||||||
states: [],
|
states: [],
|
||||||
//this is apparently used by the interactions to determine what the possible options for measurement type are
|
//this is apparently used by the interactions to determine what the possible options for measurement type are
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,8 @@ const DefaultAvailability: DeviceAvailabilityMap = new Map<quack.AddressType, De
|
||||||
[quack.ComponentType.COMPONENT_TYPE_CAPACITANCE, [0x50]],
|
[quack.ComponentType.COMPONENT_TYPE_CAPACITANCE, [0x50]],
|
||||||
[quack.ComponentType.COMPONENT_TYPE_CAPACITOR_CABLE, [0x50]],
|
[quack.ComponentType.COMPONENT_TYPE_CAPACITOR_CABLE, [0x50]],
|
||||||
[quack.ComponentType.COMPONENT_TYPE_SEN5X, [0x69]],
|
[quack.ComponentType.COMPONENT_TYPE_SEN5X, [0x69]],
|
||||||
[quack.ComponentType.COMPONENT_TYPE_AIRFLOW, [0x6c]]
|
[quack.ComponentType.COMPONENT_TYPE_AIRFLOW, [0x6c]],
|
||||||
|
[quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE, [0x6d]]
|
||||||
])
|
])
|
||||||
],
|
],
|
||||||
[quack.AddressType.ADDRESS_TYPE_DAC, [0, 1]],
|
[quack.AddressType.ADDRESS_TYPE_DAC, [0, 1]],
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,9 @@ export const MiVentV2Availability: DeviceAvailabilityMap = new Map<
|
||||||
[quack.ComponentType.COMPONENT_TYPE_PRESSURE, [0x18]],
|
[quack.ComponentType.COMPONENT_TYPE_PRESSURE, [0x18]],
|
||||||
[quack.ComponentType.COMPONENT_TYPE_DHT, [0x40]],
|
[quack.ComponentType.COMPONENT_TYPE_DHT, [0x40]],
|
||||||
[quack.ComponentType.COMPONENT_TYPE_SEN5X, [0x69]],
|
[quack.ComponentType.COMPONENT_TYPE_SEN5X, [0x69]],
|
||||||
[quack.ComponentType.COMPONENT_TYPE_AIRFLOW, [0x6c]]
|
[quack.ComponentType.COMPONENT_TYPE_AIRFLOW, [0x6c]],
|
||||||
|
[quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE, [0x6d]]
|
||||||
|
|
||||||
])
|
])
|
||||||
],
|
],
|
||||||
[quack.AddressType.ADDRESS_TYPE_POWER, [0]],
|
[quack.AddressType.ADDRESS_TYPE_POWER, [0]],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue