-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
53 lines (45 loc) · 1.58 KB
/
__init__.py
File metadata and controls
53 lines (45 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# __init__.py
from .nodes import (
ArduinoTargetNode,
ArduinoCompileUploadNode
)
from .arduino_native_nodes import (
ArduinoCreateVariableNode, # <-- NOUVEAU pour la flexibilité
ArduinoDigitalWriteNode,
ArduinoAnalogWriteNode,
ArduinoDelayNode,
ArduinoVariableInfoNode # <-- NOUVEAU pour l'info
)
from .arduino_comms_nodes import (
ArduinoSenderNode,
ArduinoReceiverNode
)
# --- Mappings for ComfyUI ---
NODE_CLASS_MAPPINGS = {
# Workflow 1: Build
"ArduinoTarget": ArduinoTargetNode,
"ArduinoCreateVariable": ArduinoCreateVariableNode,
"ArduinoDigitalWrite": ArduinoDigitalWriteNode,
"ArduinoAnalogWrite": ArduinoAnalogWriteNode,
"ArduinoDelay": ArduinoDelayNode,
"ArduinoVariableInfo": ArduinoVariableInfoNode,
"ArduinoCompileUpload": ArduinoCompileUploadNode,
# Workflow 2: Communication
"ArduinoSender": ArduinoSenderNode,
"ArduinoReceiver": ArduinoReceiverNode,
}
NODE_DISPLAY_NAME_MAPPINGS = {
# Workflow 1
"ArduinoTarget": "1. Define Arduino Target",
"ArduinoCreateVariable": "Native: Create Variable",
"ArduinoDigitalWrite": "Native: DigitalWrite",
"ArduinoAnalogWrite": "Native: AnalogWrite (PWM)",
"ArduinoDelay": "Native: Delay (Non-Blocking)",
"ArduinoVariableInfo": "Show Variable Info",
"ArduinoCompileUpload": "2. Compile & Upload",
# Workflow 2
"ArduinoSender": "Send to Arduino (by Port)",
"ArduinoReceiver": "Receive from Arduino (by Port)",
}
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
print("...Custom Nodes: ComfyUI-Arduino loaded.")