Fix: 修复arduino下include异常
This commit is contained in:
@@ -78,7 +78,7 @@ export const Mixly_motor = function (_, generator) {
|
||||
var DIR_PIN = generator.valueToCode(this, 'PIN2', generator.ORDER_ATOMIC);
|
||||
var speed = generator.valueToCode(this, 'speed', generator.ORDER_ASSIGNMENT) || '0';
|
||||
var code = 'setMotor(' + SPEED_PIN + ', ' + DIR_PIN + ', ' + speed + ');\n';
|
||||
generator.definitions_['include_Arduino'] = '#include <generator.h>';
|
||||
generator.definitions_['include_Arduino'] = '#include <Arduino.h>';
|
||||
generator.setups_['setup_output_' + SPEED_PIN + DIR_PIN + '_S'] = 'pinMode(' + SPEED_PIN + ', OUTPUT);';
|
||||
generator.setups_['setup_output_' + SPEED_PIN + DIR_PIN + '_D'] = 'pinMode(' + DIR_PIN + ', OUTPUT);';
|
||||
generator.setups_['setup_output_' + SPEED_PIN + DIR_PIN + '_S_W'] = 'digitalWrite(' + SPEED_PIN + ', LOW);';
|
||||
|
||||
Reference in New Issue
Block a user