improve serial hotplug (#389)

* - disable device when error indecates that the problem is not solvable on reconnect
- introduce a preOpenDelay of 2 seconds (currently value is hardcoded)

* rs232:
- make preOpenDelay available via webui
- fix preOpenDelay
- add basic usb serial detection

* - revert 3819ae7
- fix schema files

* make json checks compat with utf8+bom

* make shutdown effect a bit more flexible
This commit is contained in:
redPanther
2017-02-09 20:10:57 +01:00
committed by GitHub
parent 3819ae72ca
commit 170ad4f5db
26 changed files with 712 additions and 294 deletions

View File

@@ -11,6 +11,7 @@
#define INITIAL_LED_TEST_ENABLED true
#define INITIAL_LED_TEST_BRIGHTNESS 32 // 0..255
#define INITIAL_LED_TEST_TIME_MS 500 // 10..
// Number of leds in your strip. set to "1" and ANALOG_OUTPUT_ENABLED to "true" to activate analog only
// As of 26/1/2017:
@@ -137,7 +138,6 @@ void setup() {
pinMode(ANALOG_GREEN_PIN, OUTPUT);
}
// Uncomment/edit one of the following lines for your leds arrangement.
int ledCount = MAX_LEDS;
if (ANALOG_MODE == ANALOG_MODE_LAST_LED) {
ledCount--;
@@ -155,10 +155,17 @@ void setup() {
// initial RGB flash
#if INITIAL_LED_TEST_ENABLED == true
Serial.println("initial test");
showColor(CRGB(INITIAL_LED_TEST_BRIGHTNESS, 0, 0)); delay(400);
showColor(CRGB(0, INITIAL_LED_TEST_BRIGHTNESS, 0)); delay(400);
showColor(CRGB(0, 0, INITIAL_LED_TEST_BRIGHTNESS )); delay(400);
for (int v=0;v<INITIAL_LED_TEST_BRIGHTNESS;v++)
{
showColor(CRGB(v,v,v);
delay(INITIAL_LED_TEST_TIME_MS/2/INITIAL_LED_TEST_BRIGHTNESS);
}
for (int v=0;v<INITIAL_LED_TEST_BRIGHTNESS;v++)
{
showColor(CRGB(v,v,v);
delay(INITIAL_LED_TEST_TIME_MS/2/INITIAL_LED_TEST_BRIGHTNESS);
}
#endif
showColor(CRGB(0, 0, 0));