Skip to content

Commit

Permalink
add sim channel for servo
Browse files Browse the repository at this point in the history
- add servo to list node definitions
- give variable a live-output label so a simulated channel is created
  • Loading branch information
bacalj committed Mar 28, 2024
1 parent 59800c7 commit ef67d3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/plugins/dataflow/model/utilities/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import ParticulatesIcon from "../../assets/icons/sensor/particulates.svg";
import MoistureIcon from "../../assets/icons/sensor/moisture.svg";
import EmgIcon from "../../../shared-assets/icons/dataflow/control/signal.svg";
import PressureIcon from "../../../shared-assets/icons/dataflow/sensor/pressure.svg";
import ServoIcon from "../../../shared-assets/icons/dataflow/output/servo.svg";

import AbsoluteValueIcon from "../../assets/icons/transform/absolute-value.svg";
import NegationIcon from "../../assets/icons/transform/negation.svg";
Expand Down Expand Up @@ -421,6 +422,12 @@ export const NodeLiveOutputTypes = [
name: "Heat Lamp",
icon: LightBulbIcon,
relayIndex: 0
},
{
name: "Servo",
icon: ServoIcon,
angleBase: 0,
sweep: 180
}
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const potentiometerAndServoSimulation: ISimulation = {
},
{
displayName: "Servo",
labels: ["output", "physical", "decimalPlaces:0"],
labels: ["output", "physical", "live-output:Servo", "decimalPlaces:0"],
icon: iconUrl(kServoKey),
name: kServoAngleKey,
value: minServoAngle,
Expand Down

0 comments on commit ef67d3c

Please sign in to comment.