Update xdrv_27_shutter.ino

Add #define to turn off servo in ShutterPowerOff.
This commit is contained in:
mikep1998 2021-02-09 14:51:38 -08:00
parent e086c62fbb
commit 212ea27170
1 changed files with 6 additions and 2 deletions

View File

@ -458,8 +458,12 @@ void ShutterPowerOff(uint8_t i) {
switch (ShutterGlobal.position_mode) {
case SHT_PWM_VALUE:
char scmnd[20];
AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: Setting PWM%d. value: %d"), i+1,Shutter[i].pwm_value);
snprintf_P(scmnd, sizeof(scmnd), PSTR(D_CMND_PWM "%d %d" ),i+1 ,Shutter[i].pwm_value); // Add device number to PWM command
#ifdef SHUTTER_CLEAR_PWM_ONSTOP
// free the PWM servo lock on stop.
snprintf_P(scmnd, sizeof(scmnd), PSTR(D_CMND_PWM "%d 0" ), i+1);
#else
snprintf_P(scmnd, sizeof(scmnd), PSTR(D_CMND_PWM "%d %d" ), i+1,Shutter[i].pwm_value);
#endif
ExecuteCommand(scmnd, SRC_BUTTON);
break;
}