diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index a06dd1170..abe71d647 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -303,7 +303,7 @@ void SetLatchingRelay(power_t lpower, uint32_t state) } } -void SetDevicePower(power_t rpower, int source) +void SetDevicePower(power_t rpower, uint32_t source) { ShowSource(source); @@ -364,7 +364,7 @@ void SetDevicePower(power_t rpower, int source) } } -void RestorePower(bool publish_power, int source) +void RestorePower(bool publish_power, uint32_t source) { if (power != last_power) { SetDevicePower(last_power, source); @@ -374,7 +374,7 @@ void RestorePower(bool publish_power, int source) } } -void SetAllPower(uint32_t state, int source) +void SetAllPower(uint32_t state, uint32_t source) { // state 0 = POWER_OFF = Relay Off // state 1 = POWER_ON = Relay On (turn off after Settings.pulse_timer * 100 mSec if enabled) @@ -528,7 +528,7 @@ bool SendKey(uint32_t key, uint32_t device, uint32_t state) return result; } -void ExecuteCommandPower(uint32_t device, uint32_t state, int source) +void ExecuteCommandPower(uint32_t device, uint32_t state, uint32_t source) { // device = Relay number 1 and up // state 0 = POWER_OFF = Relay Off diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index c50bef2da..01f5cde34 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -500,7 +500,7 @@ static bool WifiIsInManagerMode(){ return (HTTP_MANAGER == Web.state || HTTP_MANAGER_RESET_ONLY == Web.state); } -void ShowWebSource(int source) +void ShowWebSource(uint32_t source) { if ((source > 0) && (source < SRC_MAX)) { char stemp1[20]; @@ -508,7 +508,7 @@ void ShowWebSource(int source) } } -void ExecuteWebCommand(char* svalue, int source) +void ExecuteWebCommand(char* svalue, uint32_t source) { ShowWebSource(source); ExecuteCommand(svalue, SRC_IGNORE);