diff --git a/src/device/autoDetect/DeviceScannedComponents.tsx b/src/device/autoDetect/DeviceScannedComponents.tsx
index d666264..3448b86 100644
--- a/src/device/autoDetect/DeviceScannedComponents.tsx
+++ b/src/device/autoDetect/DeviceScannedComponents.tsx
@@ -207,8 +207,8 @@ export default function DeviceScannedComponents(props: Props){
setComponents(cloneList)
}
- const removeScan = (key: string) => {
- deviceAPI.removeFoundComponents(device.settings.deviceId, key)
+ const removeScan = (key: string, type: pond.ObjectType) => {
+ deviceAPI.removeFoundComponents(device.settings.deviceId, key, type)
.then(resp => {
console.log("Cleared this scan")
}).catch(err => {
@@ -227,7 +227,7 @@ export default function DeviceScannedComponents(props: Props){
I2C Sensors
-
+
{validI2CCompAddresses.length > 0 ? validI2CCompAddresses.map((addr, index) => {
return (
@@ -269,7 +269,7 @@ export default function DeviceScannedComponents(props: Props){
Port: {portLabel}
diff --git a/src/providers/pond/deviceAPI.tsx b/src/providers/pond/deviceAPI.tsx
index f967774..56a0c0f 100644
--- a/src/providers/pond/deviceAPI.tsx
+++ b/src/providers/pond/deviceAPI.tsx
@@ -149,7 +149,7 @@ export interface IDeviceAPIContext {
keys?: string[],
types?: string[]
) => Promise;
- removeFoundComponents: (id: number, key: string, otherTeam?: string) => Promise>;
+ removeFoundComponents: (id: number, key: string, type: pond.ObjectType, otherTeam?: string) => Promise>;
}
export const DeviceAPIContext = createContext({} as IDeviceAPIContext);
@@ -989,7 +989,7 @@ export default function DeviceProvider(props: PropsWithChildren) {
})
}
- const removeFoundComponents = (id: number, key: string, otherTeam?: string) => {
+ const removeFoundComponents = (id: number, key: string, type: pond.ObjectType, otherTeam?: string) => {
let url = "/devices/" + id + "/removeFoundComponents/" + key;
const view = otherTeam ? otherTeam : as
if(view) url = url + "?as=" + view