Merge branch 'MoonModules:mdev' into mdev
This commit is contained in:
@@ -1951,6 +1951,18 @@ function readState(s,command=false)
|
||||
if (s.error && s.error != 0) {
|
||||
var errstr = "";
|
||||
switch (s.error) {
|
||||
case 1:
|
||||
errstr = "Denied!";
|
||||
break;
|
||||
case 3:
|
||||
errstr = "Buffer locked!";
|
||||
break;
|
||||
case 8:
|
||||
errstr = "Effect RAM depleted!";
|
||||
break;
|
||||
case 9:
|
||||
errstr = "JSON parsing error!";
|
||||
break;
|
||||
case 10:
|
||||
errstr = "Could not mount filesystem!";
|
||||
break;
|
||||
@@ -1963,6 +1975,9 @@ function readState(s,command=false)
|
||||
case 13:
|
||||
errstr = "Missing ir.json.";
|
||||
break;
|
||||
case 14:
|
||||
errstr = "Missing remote.json.";
|
||||
break;
|
||||
case 19:
|
||||
errstr = "A filesystem error has occured.";
|
||||
break;
|
||||
|
||||
@@ -50,6 +50,7 @@ void handleImprovPacket() {
|
||||
uint8_t rpcCommandType = 0;
|
||||
char rpcData[128];
|
||||
rpcData[0] = 0;
|
||||
if (!Serial) return; // WLEDMM avoid reading from unconnected USB-CDC
|
||||
|
||||
while (!timeout) {
|
||||
if (Serial.available() < 1) {
|
||||
|
||||
@@ -42,6 +42,7 @@ void updateBaudRate(uint32_t rate){
|
||||
// RGB LED data return as JSON array. Slow, but easy to use on the other end.
|
||||
void sendJSON(){
|
||||
if (!pinManager.isPinAllocated(hardwareTX) || pinManager.getPinOwner(hardwareTX) == PinOwner::DebugOut) {
|
||||
if (!Serial) return; // WLEDMM avoid writing to unconnected USB-CDC
|
||||
uint16_t used = strip.getLengthTotal();
|
||||
Serial.write('[');
|
||||
for (uint16_t i=0; i<used; i++) {
|
||||
@@ -55,6 +56,7 @@ void sendJSON(){
|
||||
// RGB LED data returned as bytes in TPM2 format. Faster, and slightly less easy to use on the other end.
|
||||
void sendBytes(){
|
||||
if (!pinManager.isPinAllocated(hardwareTX) || pinManager.getPinOwner(hardwareTX) == PinOwner::DebugOut) {
|
||||
if (!Serial) return; // WLEDMM avoid writing to unconnected USB-CDC
|
||||
Serial.write(0xC9); Serial.write(0xDA);
|
||||
uint16_t used = strip.getLengthTotal();
|
||||
uint16_t len = used*3;
|
||||
|
||||
Reference in New Issue
Block a user