finished the card to detect i2c components and select ones to add
This commit is contained in:
parent
eebb2407f4
commit
c8105ef624
4 changed files with 232 additions and 72 deletions
|
|
@ -167,7 +167,9 @@ export default function DevicePage() {
|
|||
const loadPortScan = () => {
|
||||
deviceAPI.listFoundComponents(device.id())
|
||||
.then(resp => {
|
||||
setScannedAddresses(resp.data.foundComponents ?? undefined)
|
||||
if (resp.data.foundComponents?.i2c){
|
||||
setScannedAddresses(resp.data.foundComponents ?? undefined)
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
|
|
@ -427,7 +429,12 @@ export default function DevicePage() {
|
|||
</Grid>
|
||||
{scannedAddresses &&
|
||||
<Grid size={{ xs: 6, sm: 6, lg: 4, xl: 4 }}>
|
||||
<DeviceScannedComponents scannedComponents={scannedAddresses} device={device}/>
|
||||
<DeviceScannedComponents
|
||||
scannedComponents={scannedAddresses}
|
||||
device={device}
|
||||
availablePositions={availablePositions}
|
||||
availableOffsets={availableOffsets}
|
||||
refreshCallback={loadDevice}/>
|
||||
</Grid>
|
||||
}
|
||||
{diagnosticComponents.length > 0 &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue