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_CAPACITOR_CABLE, 0x4f],
|
||||
[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);
|
||||
|
|
|
|||
|
|
@ -48,16 +48,16 @@ export function dragerGasDongle(subtype: number = 0): ComponentTypeExtension {
|
|||
return {
|
||||
type: quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE,
|
||||
subtypes: [
|
||||
{
|
||||
key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_NONE,
|
||||
value: "DRAGER_GAS_DONGLE_SUBTYPE_NONE",
|
||||
friendlyName: "Drager Gas Chain"
|
||||
},
|
||||
{
|
||||
key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_DEBUG_VOLTAGE,
|
||||
value: "DRAGER_GAS_DONGLE_SUBTYPE_ADVANCED",
|
||||
friendlyName: "Drager Gas Chain - Voltage Debug"
|
||||
},
|
||||
// {
|
||||
// key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_NONE,
|
||||
// value: "DRAGER_GAS_DONGLE_SUBTYPE_NONE",
|
||||
// friendlyName: "Drager Gas Chain"
|
||||
// },
|
||||
// {
|
||||
// key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_DEBUG_VOLTAGE,
|
||||
// value: "DRAGER_GAS_DONGLE_SUBTYPE_ADVANCED",
|
||||
// friendlyName: "Drager Gas Chain - Voltage Debug"
|
||||
// },
|
||||
// {
|
||||
// key: quack.DragerGasDongleSubtype.DRAGER_GAS_DONGLE_SUBTYPE_CO_CO2_NO2_O2,
|
||||
// value: "DRAGER_GAS_DONGLE_SUBTYPE_ADVANCED",
|
||||
|
|
@ -100,7 +100,7 @@ export function dragerGasDongle(subtype: number = 0): ComponentTypeExtension {
|
|||
isSource: true,
|
||||
isArray: true,
|
||||
isCalibratable: false,
|
||||
addressTypes: [quack.AddressType.ADDRESS_TYPE_CONFIGURABLE_PIN_ARRAY],
|
||||
addressTypes: [quack.AddressType.ADDRESS_TYPE_CONFIGURABLE_PIN_ARRAY, quack.AddressType.ADDRESS_TYPE_I2C],
|
||||
interactionResultTypes: [],
|
||||
states: [],
|
||||
//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_CAPACITOR_CABLE, [0x50]],
|
||||
[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]],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue