Browse Source

added PHYX support

webui
Sebastiaan Jansen 6 years ago
parent
commit
7c40145424
3 changed files with 23 additions and 3 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +18
    -0
      code/espurna/config/hardware.h
  3. +4
    -3
      code/espurna/debug.ino

+ 1
- 0
code/espurna/config/arduino.h View File

@ -97,6 +97,7 @@
//#define YJZK_SWITCH_3CH //#define YJZK_SWITCH_3CH
//#define XIAOMI_SMART_DESK_LAMP //#define XIAOMI_SMART_DESK_LAMP
//#define ALLTERCO_SHELLY2 //#define ALLTERCO_SHELLY2
#define PHYX_ESP12_RGB
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// Features (values below are non-default values) // Features (values below are non-default values)


+ 18
- 0
code/espurna/config/hardware.h View File

@ -2927,6 +2927,24 @@
#define LLMNR_SUPPORT 1 #define LLMNR_SUPPORT 1
#define NETBIOS_SUPPORT 1 #define NETBIOS_SUPPORT 1
#define SSDP_SUPPORT 1 #define SSDP_SUPPORT 1
#elif defined(PHYX_ESP12_RGB)
// Info
#define MANUFACTURER "PHYX"
#define DEVICE "ESP12_RGB"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
#define DUMMY_RELAY_COUNT 1
// Light
#define LIGHT_CHANNELS 3
#define LIGHT_CH1_PIN 4 // RED
#define LIGHT_CH2_PIN 14 // GREEN
#define LIGHT_CH3_PIN 12 // BLUE
#define LIGHT_CH1_INVERSE 0
#define LIGHT_CH2_INVERSE 0
#define LIGHT_CH3_INVERSE 0
#endif #endif


+ 4
- 3
code/espurna/debug.ino View File

@ -207,7 +207,7 @@ void debugSetup() {
* This function is called automatically if ESP8266 suffers an exception * This function is called automatically if ESP8266 suffers an exception
* It should be kept quick / consise to be able to execute before hardware wdt may kick in * It should be kept quick / consise to be able to execute before hardware wdt may kick in
*/ */
extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack_start, uint32_t stack_end ) {
/*extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack_start, uint32_t stack_end ) {
// This method assumes EEPROM has already been initialized // This method assumes EEPROM has already been initialized
// which is the first thing ESPurna does // which is the first thing ESPurna does
@ -232,7 +232,8 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack
EEPROMr.put(SAVE_CRASH_EEPROM_OFFSET + SAVE_CRASH_STACK_END, stack_end); EEPROMr.put(SAVE_CRASH_EEPROM_OFFSET + SAVE_CRASH_STACK_END, stack_end);
// write stack trace to EEPROM // write stack trace to EEPROM
int16_t current_address = SAVE_CRASH_EEPROM_OFFSET + SAVE_CRASH_STACK_TRACE;
int16_t current_address = SAVE_CRASH_EEPROM_OFF
ET + SAVE_CRASH_STACK_TRACE;
for (uint32_t i = stack_start; i < stack_end; i++) { for (uint32_t i = stack_start; i < stack_end; i++) {
byte* byteValue = (byte*) i; byte* byteValue = (byte*) i;
EEPROMr.write(current_address++, *byteValue); EEPROMr.write(current_address++, *byteValue);
@ -240,7 +241,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack
EEPROMr.commit(); EEPROMr.commit();
}
}*/
/** /**
* Clears crash info * Clears crash info


Loading…
Cancel
Save