Fix: 修复arduino下include异常

This commit is contained in:
王立帮
2024-09-11 19:30:04 +08:00
parent 84cf604c72
commit 3af2a14634
8 changed files with 14 additions and 14 deletions

View File

@@ -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);';