|
@ -1106,6 +1106,63 @@ void migrate() { |
|
|
setSetting("myDCKIGPIO", 15); |
|
|
setSetting("myDCKIGPIO", 15); |
|
|
setSetting("relays", 1); |
|
|
setSetting("relays", 1); |
|
|
|
|
|
|
|
|
|
|
|
#elif defined(YJZK_SWITCH_1CH)
|
|
|
|
|
|
|
|
|
|
|
|
setSetting("board", 85); |
|
|
|
|
|
setSetting("ledGPIO", 0, 13); |
|
|
|
|
|
setSetting("ledLogic", 0, 0); |
|
|
|
|
|
setSetting("ledWifi", 0); |
|
|
|
|
|
setSetting("btnGPIO", 0, 0); |
|
|
|
|
|
setSetting("btnRelay", 0, 0); |
|
|
|
|
|
setSetting("relayGPIO", 0, 12); |
|
|
|
|
|
setSetting("relayType", 0, RELAY_TYPE_NORMAL); |
|
|
|
|
|
|
|
|
|
|
|
#elif defined(YJZK_SWITCH_3CH)
|
|
|
|
|
|
|
|
|
|
|
|
setSetting("board", 86); |
|
|
|
|
|
setSetting("ledGPIO", 0, 13); |
|
|
|
|
|
setSetting("ledLogic", 0, 0); |
|
|
|
|
|
setSetting("ledWifi", 0); |
|
|
|
|
|
setSetting("btnGPIO", 0, 0); |
|
|
|
|
|
setSetting("btnGPIO", 1, 9); |
|
|
|
|
|
setSetting("btnGPIO", 2, 10); |
|
|
|
|
|
setSetting("btnRelay", 0, 0); |
|
|
|
|
|
setSetting("btnRelay", 1, 1); |
|
|
|
|
|
setSetting("btnRelay", 2, 2); |
|
|
|
|
|
setSetting("relayGPIO", 0, 12); |
|
|
|
|
|
setSetting("relayGPIO", 1, 5); |
|
|
|
|
|
setSetting("relayGPIO", 2, 4); |
|
|
|
|
|
setSetting("relayType", 0, RELAY_TYPE_NORMAL); |
|
|
|
|
|
setSetting("relayType", 1, RELAY_TYPE_NORMAL); |
|
|
|
|
|
setSetting("relayType", 2, RELAY_TYPE_NORMAL); |
|
|
|
|
|
|
|
|
|
|
|
#elif defined(XIAOMI_SMART_DESK_LAMP)
|
|
|
|
|
|
|
|
|
|
|
|
setSetting("board", 87); |
|
|
|
|
|
|
|
|
|
|
|
setSetting("relayProvider", RELAY_PROVIDER_LIGHT); |
|
|
|
|
|
setSetting("lightProvider", LIGHT_PROVIDER_DIMMER); |
|
|
|
|
|
setSetting("relays", 1); |
|
|
|
|
|
setSetting("chGPIO", 0, 5); |
|
|
|
|
|
setSetting("chGPIO", 1, 4); |
|
|
|
|
|
setSetting("chLogic", 0, 0); |
|
|
|
|
|
setSetting("chLogic", 1, 0); |
|
|
|
|
|
|
|
|
|
|
|
setSetting("btnGPIO", 0, 2); |
|
|
|
|
|
setSetting("btnGPIO", 1, 14); |
|
|
|
|
|
setSetting("btnRelay", 0, 0); |
|
|
|
|
|
setSetting("btnLngDelay", 500); |
|
|
|
|
|
setSetting("btnDblClick", 0, BUTTON_MODE_NONE); |
|
|
|
|
|
setSetting("btnLngClick", 0, BUTTON_MODE_NONE); |
|
|
|
|
|
setSetting("btnLngLngClick", 0, BUTTON_MODE_NONE); |
|
|
|
|
|
setSetting("btnDblClick", 1, BUTTON_MODE_AP); |
|
|
|
|
|
setSetting("btnLngLngClick", 1, BUTTON_MODE_RESET); |
|
|
|
|
|
|
|
|
|
|
|
setSetting("enc1stGPIO", 0, 12); |
|
|
|
|
|
setSetting("enc2ndGPIO", 0, 13); |
|
|
|
|
|
setSetting("encBtnGPIO", 0, 2); |
|
|
|
|
|
setSetting("encMode", ENCODER_MODE_RATIO); |
|
|
|
|
|
|
|
|
#else
|
|
|
#else
|
|
|
|
|
|
|
|
|
// Allow users to define new settings without migration config
|
|
|
// Allow users to define new settings without migration config
|
|
|