diff --git a/src/GWG/GWG.cpp b/src/GWG/GWG.cpp index f5fd235..2994e89 100644 --- a/src/GWG/GWG.cpp +++ b/src/GWG/GWG.cpp @@ -218,7 +218,7 @@ void GWG::_receive() { } if (_bytesTransferred == _currentRequest.length()) { _bytesTransferred = 0; - _setState(State::IDLE); + _setState(State::INIT); _tryOnResponse(); } } diff --git a/src/GWG/GWG.h b/src/GWG/GWG.h index b5760d8..a28e7b1 100644 --- a/src/GWG/GWG.h +++ b/src/GWG/GWG.h @@ -65,7 +65,7 @@ class GWG { uint8_t _bytesTransferred; VitoWiFiInternals::SerialInterface* _interface; Datapoint _currentDatapoint; - PacketVS1 _currentRequest; + PacketGWG _currentRequest; uint8_t* _responseBuffer; uint8_t _allocatedLength; OnResponseCallback _onResponseCallback;