Skip to content

Commit

Permalink
fix: clear BLE buffer before reading new data
Browse files Browse the repository at this point in the history
  • Loading branch information
felixerdy authored Jun 7, 2024
1 parent cbf56a4 commit 22026c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SenseBoxBLE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ void SenseBoxBLE::poll(int timeout)
*
*/
void SenseBoxBLE::poll(){
memset(configCharValue, 0, sizeof(configCharValue));
if(port.poll()){
if(parseMyValue(configCharValue,port.checkCharWritten(h_configCharacteristic))){
configCharacteristicWritten();
Expand Down Expand Up @@ -243,4 +244,4 @@ bool SenseBoxBLE::write(int characteristic, float& f1, float& f2, float& f3 , fl
return port.writeValue(characteristic,data,20);
}

//#endif
//#endif

0 comments on commit 22026c1

Please sign in to comment.