diff --git a/package-lock.json b/package-lock.json
index 437e5d5..3497cb7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10889,7 +10889,7 @@
},
"node_modules/protobuf-ts": {
"version": "1.0.0",
- "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#801fdcc314a081c283564e1ac551f8b012c0d59c",
+ "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#1facaa10a603c0cad59adad9a7ca2283f51adb62",
"dependencies": {
"protobufjs": "^6.8.8"
}
diff --git a/src/device/autoDetect/DeviceScannedComponents.tsx b/src/device/autoDetect/DeviceScannedComponents.tsx
index 2f5efdd..03a847e 100644
--- a/src/device/autoDetect/DeviceScannedComponents.tsx
+++ b/src/device/autoDetect/DeviceScannedComponents.tsx
@@ -207,7 +207,7 @@ export default function DeviceScannedComponents(props: Props){
{scannedI2C.settings?.foundAddresses && scannedI2C.settings.foundAddresses.length > 0 ? scannedI2C?.settings?.foundAddresses.map((addr, index) => {
return (
-
+
)
}) :
void
availablePositions: DevicePositions
@@ -16,7 +16,7 @@ interface Props {
}
export default function ScannedI2C(props: Props){
- const {decimalAddress, deviceProduct, componentSelectionCallback, availablePositions, sensorNum} = props
+ const {addressData, deviceProduct, componentSelectionCallback, availablePositions, sensorNum} = props
const [types, setTypes] = useState([])
const [subtypeOptions, setSubtypeOptions] = useState>([])
const [selectedPrimaryType, setSelectedPrimaryType] = useState(quack.ComponentType.COMPONENT_TYPE_INVALID)
@@ -34,7 +34,7 @@ export default function ScannedI2C(props: Props){
if(i2cMap){
i2cMap.forEach((val, key) => {
let addresses = val as number[] ?? []
- if(addresses.length > 0 && addresses.includes(decimalAddress)){
+ if(addresses.length > 0 && addresses.includes(addressData.address)){
types.push(key)
}
})
@@ -47,7 +47,7 @@ export default function ScannedI2C(props: Props){
checkAddressAvailable(types[0])
}
setTypes(types)
- },[decimalAddress, deviceProduct])
+ },[addressData, deviceProduct])
const buildSubtypeOptions = (compType: quack.ComponentType) => {
let subtypes = getSubtypes(compType)
@@ -69,7 +69,7 @@ export default function ScannedI2C(props: Props){
const checkAddressAvailable = (compType: quack.ComponentType) => {
let i2cMap = availablePositions as ComponentAvailabilityMap
let compAddresses = i2cMap.get(compType) ?? []
- if (!compAddresses.includes(decimalAddress)){
+ if (!compAddresses.includes(addressData.address)){
setAddressInUse(true)
}else{
setAddressInUse(false)
@@ -86,7 +86,10 @@ export default function ScannedI2C(props: Props){
primaryComponent.settings.type = selectedPrimaryType
primaryComponent.settings.subtype = selectedPrimarySubtype
primaryComponent.settings.addressType = quack.AddressType.ADDRESS_TYPE_I2C
- primaryComponent.settings.address = decimalAddress
+ primaryComponent.settings.address = addressData.address
+ primaryComponent.settings.expansionLine = addressData.expansionLine
+ primaryComponent.settings.muxLine = addressData.muxLine
+
primaryComponent.settings.name = getFriendlyName(selectedPrimaryType, selectedPrimarySubtype)
toAdd.push(primaryComponent)
@@ -161,9 +164,6 @@ export default function ScannedI2C(props: Props){
- {
-
- }
:
Sensor Not Supported By Product