def translate_set_rgb_led(node): if 'Device' not in node or 'R' not in node or 'G' not in node or 'B' not in node: translate_error('MAlformed set rgb led {}', node) return SetRgbLed(node['Device'], interpreter.translate_expression(node['R']), interpreter.translate_expression(node['G']), interpreter.translate_expression(node['B']))
def translate_step_servo_angle(node): if 'Increment' not in node or 'Device' not in node: translate_error('Malformed step servo angle {}', node) return StepServoAngle(node['Device'], interpreter.translate_expression(node['Increment']))
def translate_led_set(node): if 'Value' not in node or 'Device' not in node: translate_error('Malformed led set {}', node) return LedSet(node['Device'], interpreter.translate_expression(node['Value']))
def translate_set_servo_angle(node): if 'Angle' not in node or 'Device' not in node: translate_error('Malformed set servo angle {}', node) return SetServoAngle(node['Device'], interpreter.translate_expression(node['Angle']))
def translate_led_blink(node): if 'BlinkInterval' not in node or 'NumberOfBlinks' not in node or 'Device' not in node: translate_error('Malformed led blink {}', node) return LedBlink(node['Device'], interpreter.translate_expression(node['BlinkInterval']),interpreter.translate_expression(node['NumberOfBlinks']))