Closed jakkra closed 3 months ago
Abstract away the packet formatting and GB response parsing. Maybe add re-try mechanisms in case GadgetBridge is unreliable.
For example:
For the id see https://www.espruino.com/Gadgetbridge#messages-from-bangle-js-to-phone
rsp_cb(id, return_code, data); // return code OK, ERROR, Timoeut for example. zsw_ble_http_get(patch, id, rsp_cb); zsw_ble_http_abort(id); // Not sure if needed if an app is closed. Probably can just ignore the response
Abstract away the packet formatting and GB response parsing. Maybe add re-try mechanisms in case GadgetBridge is unreliable.
For example:
For the id see https://www.espruino.com/Gadgetbridge#messages-from-bangle-js-to-phone