ota static method
Implementation
static void ota(List<int> data) {
final p = malloc<Int8>(data.length);
for (var i = 0; i < data.length; i++) {
p[i] = data[i] & 0xFF;
}
slog('开始ota更新');
clingNative.cwsEnableLog(0);
updater = ClingBleUpdate.ota();
clingNative.cwsUpdatePeripheralFirmware(
p as Pointer<Void>, data.length - 2);
malloc.free(p);
_checkOtaState();
}