diff options
-rw-r--r-- | trygvisio_soil_moisture.ino | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/trygvisio_soil_moisture.ino b/trygvisio_soil_moisture.ino index 388dd8a..560aef7 100644 --- a/trygvisio_soil_moisture.ino +++ b/trygvisio_soil_moisture.ino @@ -400,6 +400,9 @@ void notify_soil_moisture(const struct sm_res& res, uint8_t body_len) { // Serial.print(F("pipe available=")); // Serial.println(available, DEC); + // This should probably be an explicit part of the API, but for now it makes it easier to implement a synchronous interface. + lib_aci_set_local_data(&aci_state, pipe_set, (uint8_t *)&res, len); + if (available && aci_state.data_credit_available > 0) { boolean sent = lib_aci_send_data(pipe_tx, data, len); if (sent) { |