finished the functionality for adding components from the scan
This commit is contained in:
parent
6b0dd9ff41
commit
65cb7acbab
7 changed files with 90 additions and 20 deletions
|
|
@ -203,6 +203,7 @@ export default function DeviceScannedComponents(props: Props){
|
|||
})
|
||||
})
|
||||
}
|
||||
console.log(cloneList)
|
||||
setComponents(cloneList)
|
||||
}
|
||||
|
||||
|
|
@ -251,7 +252,6 @@ export default function DeviceScannedComponents(props: Props){
|
|||
<Typography sx={{fontWeight: 650}}>
|
||||
Pin Port Sensors
|
||||
</Typography>
|
||||
<Button variant="contained" color="primary" onClick={()=>{}}>Clear Scan</Button>
|
||||
</Box>
|
||||
{scannedOneWire.map((scan,i) => {
|
||||
let map = FindAvailablePositions([], device.settings.product).availability.get(quack.AddressType.ADDRESS_TYPE_CONFIGURABLE_PIN_ARRAY)
|
||||
|
|
@ -265,9 +265,14 @@ export default function DeviceScannedComponents(props: Props){
|
|||
}
|
||||
})
|
||||
return(
|
||||
<Box key={i}>
|
||||
<Typography>Port: {portLabel}</Typography>
|
||||
<ScannedOneWirePort scan={scan}/>
|
||||
<Box key={i} padding={2} paddingBottom={0}>
|
||||
<Box display="flex" justifyContent="space-between">
|
||||
<Typography>Port: {portLabel}</Typography>
|
||||
<Button variant="contained" color="primary" onClick={()=>{
|
||||
removeScan(scan.key)
|
||||
}}>Clear Port Scan</Button>
|
||||
</Box>
|
||||
<ScannedOneWirePort scan={scan} componentSelectionCallback={componentSelection}/>
|
||||
</Box>
|
||||
)
|
||||
})}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue