This commit is contained in:
rusefi 2018-03-17 21:24:04 -04:00
parent 3c9ebf4513
commit c446e4c666
4 changed files with 15 additions and 3 deletions

View File

@ -192,6 +192,8 @@
#define EFI_UART_GPS TRUE
//#define EFI_UART_GPS FALSE
#define EFI_SERVO TRUE
#define EFI_ELECTRONIC_THROTTLE_BODY TRUE
//#define EFI_ELECTRONIC_THROTTLE_BODY FALSE

View File

@ -23,6 +23,7 @@
#include "max31855.h"
#include "mpu_util.h"
#include "accelerometer.h"
#include "servo.h"
#if EFI_PROD_CODE
//#include "usb_msd.h"
@ -433,6 +434,10 @@ void initHardware(Logging *l) {
initGps();
#endif
#if EFI_SERVO
initServo();
#endif
#if ADC_SNIFFER || defined(__DOXYGEN__)
initAdcDriver();
#endif

View File

@ -3,6 +3,11 @@
*
* http://rusefi.com/wiki/index.php?title=Hardware:Servo_motor
*
* SG90 pinout:
* brown GND
* red VCC
* orange PWM signal
*
* @date Jan 3, 2015
* @author Andrey Belomutskiy, (c) 2012-2018
*/
@ -46,9 +51,9 @@ static msg_t seThread(void *arg) {
while (true) {
pin.setValue(1);
percent_t position = 10 * (getTimeNowSeconds() % 10);
percent_t position = 10 * (getTimeNowSeconds() % 11); // 0, 10, .., 90, 100
float durationMs = 1 + position * 0.01;
float durationMs = 1 + position * 0.01f;
scheduleForLater(&servoTurnSignalOff, (int)MS2US(durationMs), (schfunc_t) &servoTachPinLow, NULL);

View File

@ -276,5 +276,5 @@ int getRusEfiVersion(void) {
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20180301;
return 20180317;
}