Skip to content

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
AmyangXYZ committed Jan 15, 2024
1 parent 5e0908e commit e91bf9b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
File renamed without changes.
7 changes: 4 additions & 3 deletions src/components/TopoEditToolbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ const nodeTypes = [
{
label: 'End systems',
types: [
{ label: 'Edge server', value: NODE_TYPE.END_SYSTEM_SENSOR },
{ label: 'Sensor', value: NODE_TYPE.END_SYSTEM_SENSOR },
{ label: 'Robotic arm', value: NODE_TYPE.END_SYSTEM_ROBOTIC_ARM }
{ label: 'Edge server', value: NODE_TYPE.END_SYSTEM_SERVER },
{ label: 'Temp Sensor', value: NODE_TYPE.END_SYSTEM_SENSOR_TEMP },
{ label: 'Camera', value: NODE_TYPE.END_SYSTEM_SENSOR_CAMERA },
{ label: 'Robotic arm', value: NODE_TYPE.END_SYSTEM_ACTUATOR_ROBOTIC_ARM }
]
}
]
Expand Down
7 changes: 5 additions & 2 deletions src/core/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,11 @@ export class NetworkHub {
for (let i = 1; i <= this.Config.value.num_nodes; i++) {
const n = <Node>{
id: this.Nodes.value.length,
type: [0, 1, 2, 3, 11, 12, 13, 14, 15, 16, 17][
Math.floor((this.Rand.next() * Object.keys(NODE_TYPE).length) / 2)
// type: [0, 1, 2, 3, 11, 12, 13, 14, 15, 16, 17][
// Math.floor((this.Rand.next() * Object.keys(NODE_TYPE).length) / 2)
// ],
type: [0, 1, 2, 3, 11, 12, 16][
Math.floor(this.Rand.next() * 7)
],
pos: [
Math.floor(this.Rand.next() * this.Config.value.grid_size) -
Expand Down
4 changes: 2 additions & 2 deletions src/core/typedefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export enum NODE_TYPE {
FIVE_G_GNB,
FIVE_G_UE,
END_SYSTEM_SERVER = 11,
END_SYSTEM_SENSOR,
END_SYSTEM_SENSOR_CAMERA,
END_SYSTEM_SENSOR_TEMP,
END_SYSTEM_SENSOR_PRESSURE,
END_SYSTEM_SENSOR_HUMIDITY,
Expand All @@ -27,7 +27,7 @@ export const NODE_TYPE_DISPLAY_NAME = <{ [name: string]: string }>{
FIVE_G_GNB: '5G gNB',
FIVE_G_UE: '5G UE',
END_SYSTEM_SERVER: 'Edge Server',
END_SYSTEM_SENSOR: 'Sensor',
END_SYSTEM_SENSOR_CAMERA: 'Camera',
END_SYSTEM_SENSOR_TEMP: 'Temperature Sensor',
END_SYSTEM_SENSOR_PRESSURE: 'Pressure Sensor',
END_SYSTEM_SENSOR_HUMIDITY: 'Humidity Sensor',
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useDrawTopology.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ export async function useDrawTopology(dom: HTMLElement) {
Math.PI / 2
)
await loadModel(
NODE_TYPE.END_SYSTEM_SENSOR,
'/models/es/sensor/scene.glb',
NODE_TYPE.END_SYSTEM_SENSOR_CAMERA,
'/models/es/sensor_camera/scene.glb',
2,
-Math.PI / 3
)
Expand Down

0 comments on commit e91bf9b

Please sign in to comment.