Class: PhaseTriangle
- Inherits:
-
Base
- Object
- Base
- PhaseTriangle
show all
- Defined in:
- lib/functions/triangle.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#frame_optimized, #name
Instance Method Summary
collapse
Methods inherited from Base
#add_arduino_code, #add_cycle_level_scope, #add_top_level_scope, #append_tsortable, #buildit, #depends_on, #initialize, #resolve_frame_optimized, #top_level_scope_arduino_code
Constructor Details
This class inherits a constructor from Base
Instance Attribute Details
#phase ⇒ Object
Returns the value of attribute phase.
14
15
16
|
# File 'lib/functions/triangle.rb', line 14
def phase
@phase
end
|
Instance Method Details
#arduino_code ⇒ Object
20
21
22
23
24
25
26
27
28
|
# File 'lib/functions/triangle.rb', line 20
def arduino_code
unless @frame_optimized
[
"triangle(mils, #{@phase.name}, #{@name});"
]
else
[]
end
end
|
#cycle_level_arduino_code ⇒ Object
30
31
32
33
34
35
36
37
38
|
# File 'lib/functions/triangle.rb', line 30
def cycle_level_arduino_code
if @frame_optimized
[
"triangle(mils, #{@phase.name}, #{@name});"
]
else
[]
end
end
|
#param_keys ⇒ Object
16
17
18
|
# File 'lib/functions/triangle.rb', line 16
def param_keys
[:phase]
end
|
#top_level_scope_code ⇒ Object
40
41
42
43
44
|
# File 'lib/functions/triangle.rb', line 40
def top_level_scope_code
[
"long #{@name}[3];",
]
end
|