mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 04:36:31 +00:00
Add Sonoff L1 MusicSync off when a color change is requested
Add Sonoff L1 MusicSync off when a color change is requested (#12930)
This commit is contained in:
parent
bbe9f8f4ef
commit
cf2891f9b9
@ -286,6 +286,16 @@ bool SnfL1SetChannels(void) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SnfL1SetChannelsFromFunc(void) {
|
||||||
|
static bool first_call = true;
|
||||||
|
if (first_call) {
|
||||||
|
first_call = false; // Allow MusicSync at init time
|
||||||
|
} else {
|
||||||
|
Settings->sbflag1.sonoff_l1_music_sync = 0; // Disable MusicSync on user color change
|
||||||
|
}
|
||||||
|
return SnfL1SetChannels();
|
||||||
|
}
|
||||||
|
|
||||||
bool SnfL1ModuleSelected(void) {
|
bool SnfL1ModuleSelected(void) {
|
||||||
if (SONOFF_L1 == TasmotaGlobal.module_type) {
|
if (SONOFF_L1 == TasmotaGlobal.module_type) {
|
||||||
if (PinUsed(GPIO_RXD) && PinUsed(GPIO_TXD)) {
|
if (PinUsed(GPIO_RXD) && PinUsed(GPIO_TXD)) {
|
||||||
@ -345,7 +355,7 @@ bool Xlgt05(uint8_t function)
|
|||||||
result = SnfL1SerialInput();
|
result = SnfL1SerialInput();
|
||||||
break;
|
break;
|
||||||
case FUNC_SET_CHANNELS:
|
case FUNC_SET_CHANNELS:
|
||||||
result = SnfL1SetChannels();
|
result = SnfL1SetChannelsFromFunc();
|
||||||
break;
|
break;
|
||||||
case FUNC_MODULE_INIT:
|
case FUNC_MODULE_INIT:
|
||||||
result = SnfL1ModuleSelected();
|
result = SnfL1ModuleSelected();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user