QUB-ASL / bzzz

Quadcopter with ESP32 and RaspberryPi
MIT License
7 stars 1 forks source link

Possible issues with reading data from RPi #48

Closed alphaville closed 1 year ago

alphaville commented 1 year ago

This is how we read the data from the Raspberry Pi:

String allDataFromPi;
if (Serial.available() > 0) {
    allDataFromPi = Serial.readStringUntil('\n');
    for (int i = 0; i < 16; i++) {
         m_channelData[i] = allDataFromPi.substring(1, allDataFromPi.indexOf(",")).toInt();
         allDataFromPi = allDataFromPi.substring(allDataFromPi.indexOf(",") + 1);
    }
}

There may be some issues here:

patchedByBatman commented 1 year ago

The suggestions have been adapted and tested in #52. After testing, no issues were found. Closing this issue.

alphaville commented 1 year ago

Reopening because the PR has not been reviewed/merged

patchedByBatman commented 1 year ago

The suggestions have been adapted and tested in #52, and it has been approved now.