Added strip length adjustment via serial and wifi. Working toward "no compile" required for any setup.

- fixed bug in settings when initial read failed. It was
   trying to
turn off the sound timer while it was still NULL
 - Number of LEDs is
now adjustable via serial and wifi. Woot, no
   recompile just to
change strip length.
 - A little refactoring so Wifi and Serial
interfaces can share
   some code.
 - Added Refresh button to web page
This commit is contained in:
bdring
2018-03-31 17:13:35 -05:00
parent 1959787e9b
commit 420e9e52a0
5 changed files with 174 additions and 142 deletions

View File

@@ -58,12 +58,14 @@ void sound_init(int pin){ // pin must be a DAC pin number !! (typically 25 or 2
void sound_pause() // this prevents the interrupt from firing ... use during eeprom write
{
timerStop(sndTimer);
if (sndTimer != NULL)
timerStop(sndTimer);
}
void sound_resume() // resume from pause ... after eeprom write
{
timerRestart(sndTimer);
if (sndTimer != NULL)
timerRestart(sndTimer);
}
bool sound(uint16_t freq, uint8_t volume){