Skip to content

Commit

Permalink
Refactor shutter support
Browse files Browse the repository at this point in the history
Refactor shutter support (#6516)
  • Loading branch information
arendst committed Sep 30, 2019
1 parent f2ed754 commit 7689534
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 144 deletions.
3 changes: 1 addition & 2 deletions sonoff/sonoff.ino
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ power_t blink_mask = 0; // Blink relay active mask
power_t blink_powersave; // Blink start power save state
power_t latching_power = 0; // Power state at latching start
power_t rel_inverted = 0; // Relay inverted flag (1 = (0 = On, 1 = Off))
power_t shutter_mask = 0; // Bit Array to mark all relays that belong to at least one shutter
int baudrate = APP_BAUDRATE; // Serial interface baud rate
int serial_in_byte_counter = 0; // Index in receive buffer
int ota_state_flag = 0; // OTA state flag
Expand Down Expand Up @@ -139,7 +138,7 @@ uint8_t seriallog_level; // Current copy of Settings.seriallo
uint8_t syslog_level; // Current copy of Settings.syslog_level
uint8_t my_module_type; // Current copy of Settings.module or user template type
uint8_t my_adc0; // Active copy of Module ADC0
uint8_t last_source = 0;
uint8_t last_source = 0; // Last command source
uint8_t shutters_present = 0; // Number of actual define shutters
//uint8_t mdns_delayed_start = 0; // mDNS delayed start
bool serial_local = false; // Handle serial locally;
Expand Down
2 changes: 1 addition & 1 deletion sonoff/xdrv_20_hue.ino
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ void HueLights(String *path)
#ifdef USE_SHUTTER
if (ShutterState(device)) {
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("Settings.shutter_invert: %d"), Settings.shutter_invert[device-1]);
SetShutterPosition(device, bri * 100.0f );
ShutterSetPosition(device, bri * 100.0f );
} else
#endif
if (light_type && (local_light_subtype > LST_NONE)) { // not relay
Expand Down
Loading

0 comments on commit 7689534

Please sign in to comment.